today I tried to figure out how to add an Alphachannel to a JPG-Image. Means: transforming from 24 to 32Bits, I suppose. I don't like API-Calls, if not needed.
This is the code-fragment which did the trick.
Code: Select all
CreateImage(999,ImageWidth(ToImage),ImageHeight(ToImage),32)
StartDrawing(ImageOutput(999))
DrawAlphaImage(ImageID(ToImage), 0, 0, 255)
StopDrawing()
CopyImage(999,ToImage)
On Mac OS, the PB-routines draw alpha-channels on not-alphachannelled-jpeg-images, so I wondered why Windows doesn't.
Oh: using Windows XP.
EDIT: corrected the code. Should work now, as said.