Page 2 of 2
Posted: Fri May 09, 2008 8:49 pm
by Karbon
If I start with an 8 bit BMP it works in color here. I emailed you an example.
I'll email you the BMP too.
Posted: Fri May 09, 2008 8:51 pm
by srod
I used your 24-bit bitmap, used FreeImage() to convert to an 8-bit one and then saved as a gif. I ended up with just grey colors in the image.
Posted: Fri May 09, 2008 8:52 pm
by Karbon
I didn't use FreeImage to convert it from a 24 to 8 bit BMP - I can get an 8 bit BMP out of the software that it comes from..
Posted: Fri May 09, 2008 8:55 pm
by srod
Ah, that explains it! FreeImage, when converting from 24 bits to 8-bits, seems to select a gray-scale palette.
By the way Karbon, with the help manual which comes with FreeImage, there is a table in the appendix which lists the supported bit depths for each image type etc.
In this instance, however, I'd consider gdi+ as it makes a much better job of converting a 24-bit bitmap to a gif.
Re:
Posted: Sun Jan 10, 2021 12:06 am
by BarryG
srod's tiny code is fantastic, but is there a way to tweak it so it can save a GIF from an image in memory, rather than from a file? Because SaveImage() doesn't support #PB_ImagePlugin_GIF yet. Thanks.