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! / Get Image / Sprite Usage and Transparency

Author
Message
Prep
22
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 9th May 2004 20:35
I may just be missing something here but when I fire a get image command and use the image on a sprite the set colorkey isn't transparent and thus I get this pink background (255, 0,255) which isn’t so great for a snow effect.

Any ideas?

To be no more, sad cure.
the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 9th May 2004 21:48
Make sure you load the bitmap from a lossless format like png or bmp. If you use a lossy format like jpg the colour values of the pixels are changed during compression, all the pink pixels will end up as lots of similar coloured pixels.

i won't see you in the pit
Prep
22
Years of Service
User Offline
Joined: 17th Nov 2003
Location:
Posted: 9th May 2004 23:20
Thanks for your help but alas thats not the problem

What i'm doing is starting some weather effects (snow in this case) for a top down RPG i'm doing and the whole image i'm grabbing is created dynamically currently using some slighty modified code from the codebase.

Heres the function i'm using, i'm going to redo the snowcode, its too much for something so little, but its the image part i'm more interested in.

SNOW_SPRITE is a constant.
The sprite has already been created when this fires.

Thanks again for any aid.



To be no more, sad cure.

Login to post a reply

Server time is: 2026-06-09 13:55:59
Your offset time is: 2026-06-09 13:55:59