Subject: Re: [boost] [gil new_io] tiff alpha channel support
From: Erik Hvatum (ice.rikh_at_[hidden])
Date: 2011-04-24 01:54:50
> thanks for the sample image. Do you mind when I add it to my test cases?
You're welcome, and thanks for your help. I release tifffile.tif into the public domain; you may use it as you wish.
> I did try to run and it work for me the first time. But then I
> realized I was using read_image() instead of read_image_and_convert().
> Is there any reason you use read_image_and_convert()?
I use read_image_and_convert() in case the user supplies a tiff that is not exactly what I want (8 bits per sample, 4 sample per pixel RGBA). To load a grayscale file directly into an rgb8_image_t, read_image_and_convert() is required, correct? Is the same true for loading a 24-bit RGB image (8 bits per sample, 3 samples per pixel) into an argb8_image_t?
> I did add a fix to read.hpp. Please try if you have time.
This fix seems to do the trick - the crash does not occur and I verified that the alpha channels for a number of tiffs are loaded correctly.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk