SaveImage(....) - 32 bit bitmap

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

SaveImage(....) - 32 bit bitmap

Post by srod »

My apologies if this has been asked before, but I loaded a 32-bit png which is fine. Saving using the PNG image encoder it is great to see that the alpha-channel is now preserved etc.

However, I would actually like to save the image as a 32-bit bitmap rather than the 24-bits to which Purebasic seems to default. I can do this with api without a problem, but it would of course be more convenient if PB did this natively. :)

Any chance of SaveImage(), when saving bitmaps, saves 32-bit images as ... 32-bit images, and all others as 24-bit etc? I realise that GDI doesn't really support 32-bit images (in that it doesn't work with the alpha channel) but I still find such images useful nevertheless. Should be a pretty painless alteration. :)

Thanks.
I may look like a mule, but I'm not a complete ass.
Thorium
Addict
Addict
Posts: 1305
Joined: Sat Aug 15, 2009 6:59 pm

Re: SaveImage(....) - 32 bit bitmap

Post by Thorium »

Yes, should be easy to implement. I guess it's not available now because bmp does not officialy support alpha channel. However it's easy to save it to it.
Post Reply