Number of colors in bitmap thumbnail

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

Forums: 

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