2001.05.02 12:45 "Pixel Raster (DIB) into TIFF G4", by Wolfram Bettermann

2001.05.02 12:45 "Pixel Raster (DIB) into TIFF G4", by Wolfram Bettermann

Hi y'all,

I would like to ask you guys for your help. In my app I do have a rectangular pixel raster, width times height, a pure black&white image, where 8 pixel are packed into one byte, aligned to 32 bit boundary (padded with 0, which is the typical Microsofts Device Independent Bitmap version of the raster).

I have tried to convert this packed raster into a TIFF G4 using TIFFWriteEncodedSTrip, but do get an error message that the ImageLength is not set (altough I did with TIFFSetField) but was not sure how to tell libtiff where this raster buffer resides.

My question is, do I first have to unpack the bytes that 1 pixel (1bit) is in ne byte (so width is now really one pixel per byte) and then pass this buffer to libtiff using WriteEncodedStrip? And if yes, how do I pass this raster buffer to the libtiff?

Any help is highly appreciated!

wolfram