[Mono-winforms-list] libgdiplus/System.Drawing patch: native support for indexed Bitmaps
Fabian Luque <firstname.lastname@example.org>
Wed, 16 Mar 2005 21:16:50 -0300
> The patch changes the way the image is loaded. libpng has a convenience
> function where it can automatically upsample the image on behalf of the
> application. Before the patch, pngcodec.c uses this function, because all
> bitmaps needed to be 32-bit RGB anyway. After the patch, pngcodec.c checks
> if it is a palettized file, and if it is, attempts to retrieve the 1-, 4-
> or 8-bpp bits (if it's 2-bpp then it resamples it to 4-bpp, since there is
> no PixelFormat.Format2bppIndexed), as well as the palette which it attaches
> to the GpImage.
> It seems rather odd that libpng would tell you the palette was invalid. Can
> you make a sample PNG file that fails available so that I can do some testing?
Yes, I'll send you a PNG tomorrow morning when I'm at work. I can't
tell you exactly which error was because I updated my copy of
libgdiplus from SVN and your diff does not apply anymore.