Page 1 of 1

imageColorAllocateAlpha() for GIFs

Posted: Mon Feb 04, 2008 5:05 am
by Ollie Saunders
It seems that imageColorAllocateAlpha() functions as if there is no alpha at all for GIF images. Does anybody know of a workaround, how to get imageColorAllocateAlpha() to work for GIF images how it should?

Re: imageColorAllocateAlpha() for GIFs

Posted: Mon Feb 04, 2008 8:13 am
by Zoxive
GIFs do not technically have an alpha channel, only 2 states, on or off.

Re: imageColorAllocateAlpha() for GIFs

Posted: Tue Feb 05, 2008 2:01 am
by Ollie Saunders
This I understand. In this instance I don't actually want to leave any semi-transparent pixels I just want to fill with white at 50% opacity creating a washed out image which can be achieved by changing the existing colour pallette.

Hmm, it would be slow but perhaps I could iterate over each pixel.