AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2016.10.25 20:02 "[Tiff] problem adding YRESOLUTION and RESOLUTIONUNIT to 16bit grayscale TIFF", by Paul Hemmer
2016.10.27 15:55 "Re: [Tiff] problem adding YRESOLUTION and RESOLUTIONUNIT to 16bit grayscale TIFF", by Paul Hemmer
2016.10.27 16:08 "Re: [Tiff] problem_adding_YRESOLUTION_and_RESOLUTIONUNIT_to _16bit grayscale_TIFF", by Even Rouault
2016.12.13 14:42 "[Tiff] WinAPI, save screenshot into tiff", by
2016.12.13 15:18 "Re: [Tiff] WinAPI, save screenshot into tiff", by Paavo Helde

2016.12.13 15:18 "Re: [Tiff] WinAPI, save screenshot into tiff", by Paavo Helde

On 13.12.2016 16:42, Urbach, Marcel [Rohmann GmbH] wrote:

Hello Guys
I want to capture a screenshot by using winapi only (no MFC wanted) and save it as bitmap into a tiff file.
The screen is captured correctly, but it looks like the bitmap is saved 4 times into the tiff and now looks like this:

     TIFFSetField( tiff, TIFFTAG_BITSPERSAMPLE, info.bmiHeader.biBitCount );

biBitCount is 24 for typical RGB images, but you need to pass 8 to libtiff as this number is "per sample".

Cheers
Paavo