Page 1 of 1

Can I set a colour key for an image?

Posted: Mon Jul 21, 2008 1:52 pm
by Jake
Can I create an image from something.gif and then make anything that is pink (255,0,255) transparent? Pixel images are easy to edit in MSPaint :D

Does Love support this (Nothing in the docs)? I know there is a SDL_SetColorKey function.

Re: Can I set a colour key for an image?

Posted: Mon Jul 21, 2008 3:37 pm
by rude
Sorry, LÖVE does not support this. You'll have to use some sort of alpha-capable format. Transparent pixels in normal GIFs may end up as transparent in LÖVE, but I've never actually tried it. :D

As for SDL_SetColorKey, we're not using SDL_surfaces, so that won't work.

Re: Can I set a colour key for an image?

Posted: Mon Jul 21, 2008 3:54 pm
by Jake
Ah okay, it was just for convenience really. Transparent PNGs work fine.