I'm starting to work with PureBasic v5.11 and mesclar need multiple images in bmp with black color background, but I can not get over the image you are left with transparent background, and the text is cropped. This is the first result I want to get (I really want mesclar 5 or 6 images):

This is my code:
Code: Select all
base = CreateImage(#PB_Any, 210, 210)
layer1 = LoadImage(#PB_Any, "backgrd.bmp")
layer2 = LoadImage(#PB_Any, "xclock.bmp")
StartDrawing(ImageOutput(layer1)) ; Create a layer, add some text
DrawingMode(#PB_2DDrawing_Transparent)
DrawText(15,40, "Hello World! - Hello World!", RGB(255,255,255))
DrawText(37, 133, "2DDrawing_Transparent", RGB(0,255,0))
StopDrawing()
StartDrawing(ImageOutput(layer2))
DrawingMode(#PB_2DDrawing_Transparent) ; Another layer
StopDrawing()
StartDrawing(ImageOutput(base)) ; combine the layers (same as 'Merge Visible' in Photoshop)
DrawingMode(#PB_2DDrawing_AlphaBlend)
DrawImage(ImageID(layer1),5,5)
DrawImage(ImageID(layer2),48,130)
StopDrawing()
OpenWindow(0,0,0,220,220,"",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
ImageGadget(7, 5, 5, 200, 210,ImageID(base))
Repeat:Until WaitWindowEvent() = #PB_Event_CloseWindow

I hope you can help and thanks in advance for your answers.
PS: English is not my native language, sorry for grammar errors.