| AWARE [SYSTEMS] | Imaging expertise for the Delphi developer | |||||||
![]() |
TIFF and LibTiff Mailing List Archive | |||||||
LibTiff Mailing List
TIFF and LibTiff Mailing List Archive Contact
The TIFF Mailing List Homepage |
Thread1999.01.18 16:17 "Re: Opening a tiff image using VC++", by Sim ZacksI turned the library into a DLL and am writing an imaging toolkit in windows. The method I use is I read the bits into memory (using either readEncodedStrip or ReadScanline) and fill out a BitmapInfoHeader gotten by calling the Getfield function for all the tags I need. The you can either create a DIB by calling CreateDIBSection which gives you an HBitmap or call StretchDIBits and put it directly on the screen. I'm using Delphi, but I can send you an example if you want. There are some bugs in StretchDIBits but it is very easy to use, and you can get around most of them. Sim -----Original Message----- From: Nick Westwood [SMTP:nick@kabalagogo.ndirect.co.uk] Sent: Friday, January 16, 1998 9:57 AM To: TIFF List Server Subject: Re: Opening a tiff image using VC++ I'm using VC++ 4 (soon to switch to VC++ 5) and successfully compiled the library into a static lib and a dll. I found a C++ library on the net called PaintLib and took their modifications and applied them to TIFFLIB. Seems to work fine. I've used it to write some tools to append single tif files into multi-page ones and split them out again. I need to write a viewer now though and I'm having lots of problems displaying a tif file under Win95/NT. I've tried to use the tif2dib contribution supplied with TIFFLIB and though it compiles fine into the library and seems to return a valid handle to a DIB, I can't get it to do anything but display a black rectangle. If anyone on the list has had any success with displaying tif files under Windows I'd love to hear from them - this is driving me nuts and I'm sure I cant be the only one who wants to do this. If anyone has any sample code or could give me any helpful pointers I would be very, very, very grateful. Regards Nick Westwood |
|||||||