AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2008

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2008.07.03 15:36 "Converting BMP to Tiff", by Lou Feliz
2008.07.03 21:18 "Converting BMP to Tiff", by Lou Feliz
2008.07.21 11:48 "Re: Converting BMP to Tiff", by Gerben Vos

2008.07.21 11:48 "Re: Converting BMP to Tiff", by Gerben Vos

Lou Feliz wrote:

> I updated the function to use COMPRESSION_LZW and it works as
> I need it.

The actual problem is this line in the WriteBitmapToTiff
function:

TIFFSetField(OpenTiff, TIFFTAG_PHOTOMETRIC,
PHOTOMETRIC_MINISWHITE);

You should change that to:

TIFFSetField(OpenTiff, TIFFTAG_PHOTOMETRIC,
PHOTOMETRIC_MINISBLACK); 

This is because in bitmaps usually 0 means black and 1 means
white. But in TIFF it is quite common to use the opposite
representation, because that is also used by faxes.

I'm not quite sure why changing the compression to LZW also
works for you. Maybe the TIFF viewer that you use ignores the
difference between these two photometrics when you view an
LZW-compressed image.

					Gerben.