[Implemented] CreateImage transparent flag
Posted: Fri Sep 18, 2009 10:59 am
Please add a flag to CreateImage that allows us to get a blank transparent image instead of a black one, thanks.
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
Procedure CreateTransparentImage(Image, Width, Height)
Protected Result = CreateImage(Image, Width, Height, 32)
If Image = #PB_Any : Image = Result : EndIf
If IsImage(Image)
If StartDrawing(ImageOutput(Image))
DrawingMode(#PB_2DDrawing_AlphaChannel)
Box(0,0,ImageWidth(Image),ImageHeight(Image),$00000000)
StopDrawing()
ProcedureReturn Result
EndIf
EndIf
EndProcedure