Load-/CatchImage() add ImageDepth and BackColor

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Load-/CatchImage() add ImageDepth and BackColor

Post by nco2k »

Help wrote:When an image is loaded, it is converted either in 24-bit (if the image depth is less or equal to 24-bit) or in 32-bit (if the image has an alpha-channel).
which is cool, but since the image has to be converted anyway, why not simply have the option to convert it directly to 32bit and add a transparent background color? or the other way around, get rid of the alpha channel from a 32bit image and force 24bit.

Code: Select all

LoadImage(#Image, FileName$ [, Depth [, BackColor]])
CatchImage(#Image, *Memory [, Size [, Depth [, BackColor]]])
would be a great time saver.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf