Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Transparency Problems

Author
Message
Sharp
20
Years of Service
User Offline
Joined: 5th Jan 2004
Location: The Maxrix
Posted: 5th Jan 2004 21:39
So heres the thing:

I have a png file with a transparent background and another file witch I want it to go on Without actualyy saving it. so later i can grab the image to put on the screen with the other one on top without changing any of the acutal files. I have done this but the transparent background is just comng out white when i paste it on top. How do i fix this?

WHAT DO I PUT HERE??

(kidding)
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 6th Jan 2004 02:17 Edited at: 6th Jan 2004 02:19
How exactly are you doing it,
load 1st image to bitmap, pasting 2nd image to same bitmap, using get image to get the final image?

If you are using paste image then you need to use the transparancy flag,
paste image 1,0,0,1

Also note that bitmaps don't have any transparancy(alpha) info, Get image uses black or whatever colour is specified with SET COLOR KEY.

dbpro : 2ghz p4m : 512mb : geforce 4 4200 go
Sharp
20
Years of Service
User Offline
Joined: 5th Jan 2004
Location: The Maxrix
Posted: 6th Jan 2004 21:34
hmm SET COLOR KEY dosent seem to be a command, is this for drakrbasic pro of the original one cos i have pro?

WHAT DO I PUT HERE??

(kidding)
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 6th Jan 2004 23:03
Sorry it's
set image colorkey


dbpro : 2ghz p4m : 512mb : geforce 4 4200 go
Tomy
20
Years of Service
User Offline
Joined: 25th Dec 2003
Location:
Posted: 7th Jan 2004 00:12
Change the the .png to .bmp
That should do it
set image color key red, green, blue (the color you don't want to display)
"set sprite" command to set the transparenty settings (I don't know the parameters by heart, but look in the help menu!)

Login to post a reply

Server time is: 2024-05-11 22:56:48
Your offset time is: 2024-05-11 22:56:48