I thought that ImageGadgets respected the transparency of 32bit images, but apparently not - I was expecting to see the underlying background (Canvas).
So, is there a flag to make this happen? I can fake it by drawing the image onto another that is first filled with the background colour, but in the app I'm currently building, the User could change the background colour after the image is set in the ImageGadget...........
Edit: Conundrum! In my app, the code defines the image, then either saves a 32bit PNG file or saves to the clipboard. If the PNG is drag & dropped into an image gadget (in a separate app), the transparency is not respected. If the image is pasted into an image gadget from the clipboard, transparency is perfect.
Edit: Solution was to explicitly save a 32bit image with transparency - by default, it is actually saved as 24bit with transparency, which worked in all my apps (arrived correctly) except those written in PB. So, my bad!
Code: Select all
SaveImage(#IMAGE_Out,sgImageOutFile,#PB_ImagePlugin_PNG,32)