Can I set a colour key for an image?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
User avatar
Jake
Prole
Posts: 27
Joined: Sun Jul 20, 2008 2:01 pm

Can I set a colour key for an image?

Post 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.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

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

Post 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.
User avatar
Jake
Prole
Posts: 27
Joined: Sun Jul 20, 2008 2:01 pm

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

Post by Jake »

Ah okay, it was just for convenience really. Transparent PNGs work fine.
Post Reply

Who is online

Users browsing this forum: No registered users and 198 guests