Quote: "To make any colour transparent ... after you have loaded it."
Pincho, you're onto something
Which made me think how to incorporate that into a
single process and I came up with a re-work on the earlier code I posted.
OP, I believe this solves your problems!
`Re-work on previous code.
`Setup Display
SET WINDOW ON
SET DISPLAY MODE DESKTOP WIDTH(), DESKTOP HEIGHT(), 32
`Assign a random colour to the bg for test purposes
BACKDROP ON: COLOR BACKDROP RGB(0,255,0)
`Make an object
MAKE OBJECT SPHERE 1, 1
`Make a directory to save in
IF PATH EXIST("C:\aaaa_killme\") = 0: MAKE DIRECTORY "C:\aaaa_killme\": ENDIF
savefile$ = "C:\aaaa_killme\MyImage00001.png"
IF FILE EXIST(savefile$) = 1: DELETE FILE savefile$: ENDIF
`Mainloop
DO
`Set camera to image (obviously)
SET CAMERA TO IMAGE 0, 10, DESKTOP WIDTH(), DESKTOP HEIGHT()
`Let the image be displayed
PASTE IMAGE 10, 0, 0
TEXT 1, 20, "Press Space to save the image"
TEXT 1, 40, "Press q/Esc to exit without doing that"
`If q pressed quit, if space pressed, take snap
IF KEYSTATE(16) = 1: END: ENDIF
IF SPACEKEY() = 1
`Wait until space released
WHILE SCANCODE() > 0: ENDWHILE
`Now Create a BITMAP to place the transparent image!!
CREATE BITMAP 2, SCREEN WIDTH(), SCREEN HEIGHT()
SET CURRENT BITMAP 2
CLS
`As Pincho mentioned, use the COLORKEY
SET IMAGE COLORKEY 0, 255, 0
`Paste the image to the bitmap
PASTE IMAGE 10, 0, 0
`Now grabbing the image EXCLUDES the colourkey
GET IMAGE 99, 0, 0, SCREEN WIDTH(), SCREEN HEIGHT()
`Save image
SAVE IMAGE savefile$, 99
`Set the drawing back to the screen and destroy the bitmap
SET CURRENT BITMAP 0
DELETE BITMAP 2
`Open the image with default editor/viewer
EXECUTE FILE savefile$, "", ""
`Close this process
END
ENDIF
LOOP
This isn't very elegant but
it actually saves the image with a 00 alpha background!! You'll have to customize it to your requirements but you've got the theory now.