Hi,
I noticed that for .dng files with bitmap thumbnail LibRaw claims that there is no color in the preview (thumbnail.tcolors = 0 after open_file() + unpack_thumb()).
Shouldn't it return 3 colors (tcolors = 3) as from documentation LIBRAW_THUMBNAIL_BITMAP preview contains RGB bitmap?
Example files:
https://drive.google.com/open?id=0B6ENEUKTZp-LUmk5MHliWl9NSlk
https://drive.google.com/open?id=0B6ENEUKTZp-LaW1WN0R4X25UX3M
Thank you,
Konrad
Agree, it would be better to
Agree, it would be better to initialize this field into correct value, at least if preview IFD contains SamplesPerPixel tag.
I need to collect more samples (at least color DNG + BW preview) to implement it in correct way (unpack_thumb assumes 3 colors for PPM bitmaps, this may be not correct and will result into read beyond EOF).
Expect fix in 0.19-snapshot coming soon.
-- Alex Tutubalin @LibRaw LLC
LibRaw 0.19-20170812 just
LibRaw 0.19-20170812 just published: https://www.libraw.org/news/libraw-0-19-snapshot-20170812
We've reworked imgdata.thumbnails.tcolors field
- correct handling for bitmap (based on SubIFD SamplesPerPixel field)
- if compiled with JPEG, jpeg header parsed for color count too (so for BW JPEG previews this field is correct).
-- Alex Tutubalin @LibRaw LLC
Thank you for quick fix!
Thank you for quick fix!
Konrad