Maybe it's useful, I'm not sure. But it isn't needed for the OP's stated purpose as a 24bit output is fine as a target for alphablended operations. Note the identical result of applying alphablended text on each target:
Code: Select all
;24 Bits target output:
CreateImage(0, 320, 60, 24, RGB(0,0,100))
StartVectorDrawing(ImageVectorOutput(0))
VectorSourceLinearGradient(0, 0, 400, 0)
VectorSourceGradientColor(RGBA(255, 0, 0, 164), 0.0)
VectorSourceGradientColor(RGBA(0, 255, 0, 88), 0.5)
VectorSourceGradientColor(RGBA(0, 0, 255, 40), 1.0)
VectorFont(LoadFont(0, "Arial Black", 24))
MovePathCursor(20,0)
AddPathText("Hello World!")
FillPath()
StopVectorDrawing()
; 32 Bits target output:
CreateImage(1, 320,60,32,RGB(0,0,100))
StartVectorDrawing(ImageVectorOutput(1))
VectorSourceLinearGradient(0, 0, 400, 0)
VectorSourceGradientColor(RGBA(255, 0, 0, 164), 0.0)
VectorSourceGradientColor(RGBA(0, 255, 0, 88), 0.5)
VectorSourceGradientColor(RGBA(0, 0, 255, 40), 1.0)
VectorFont(LoadFont(0, "Arial Black", 24))
MovePathCursor(20,0)
AddPathText("Hello World!")
FillPath()
StopVectorDrawing()
OpenWindow(0,0,0,320,240,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
ImageGadget(0,0,20,0,0,ImageID(0))
ImageGadget(1,0,90,0,0,ImageID(1))
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow