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.

DarkBASIC Professional Discussion / set image colorkey not working

Author
Message
berserkivix
User Deleted
Posted: 25th Oct 2013 23:00
hello everyone.
i have some images which i'm using for a game, i saved them all as bmp and double checked background is exactly rgb 0,0,0.
anyhow, set image colorkey wont do the transparency...

Attachments

Login to view attachments
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 26th Oct 2013 01:19 Edited at: 26th Oct 2013 01:22
my guess is that you're using the horrible example under the help files for set image colorkey:

which is junk...

instead, try:

which definitely works with the .bmp that you provided (i renamed it to test.bmp) where i first clear the screen with red to show that the (true) black is transparent/allowing the red to show through.
(note the final ,1 transparency flags set when loading/pasting the image)

there are points in your "black" that aren't true rgb(0,0,0) so you need to reconsider how you're building/converting your image, as well:


Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Oct 2013 01:42
Or with objects you could do this:





Powered by Free Banners
berserkivix
User Deleted
Posted: 26th Oct 2013 15:40
thanks a bunch, i solved

Login to post a reply

Server time is: 2024-04-19 09:10:11
Your offset time is: 2024-04-19 09:10:11