[3/5] windowscodecs: Create a predefined black&white palette if 1 bpp TIFF image doesn't have one.

Vincent Povirk madewokherd at gmail.com
Wed Jul 11 10:04:32 CDT 2012


>> The test in 2/5 was for gdiplus, not WIC.
>
> My understanding is that gdiplus just reports what WIC returns in that regard,
> and gdiplus doesn't generate fake palettes for real images (read: loaded from
> a stream or a file).

WIC did report a grayscale palette, implicitly in the pixel format. It
doesn't need an explicit palette because it's not reporting an indexed
color format.

> Yes, but it should do that only for broken cases, when palette is not
> provided with source data, like converting from indexed BitmapData in
> GdipBitmapUnlockBits, or for idexed formats passed to GdipCreateBitmapFromScan0.

I see no reason why gdiplus can't or shouldn't add a palette when
converting from a WIC source with a grayscale image format to a
gdiplus bitmap. If the resulting bitmap is indexed color, it probably
should.



More information about the wine-devel mailing list