[Solved]Getting the transparency color from a gif in GD

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
RandomEngy
Forum Contributor
Posts: 173
Joined: Wed Jun 26, 2002 3:24 pm
Contact:

[Solved]Getting the transparency color from a gif in GD

Post by RandomEngy »

I've got a situation where I want to load in a gif that has a transparency, put some text on it, then output it again with the transparency intact. However when I load it, put the text on, then output it, the transparency is lost. I figured I'd have to set the transparency color myself before drawing it, but I can't find any function which will allow me to find out which color this is.

Does anyone have any ideas on this? Is there some trick that would allow me to pull the color out of the binary somewhere? Or is the transparency information not even loaded into the image?

Thanks.
Last edited by RandomEngy on Wed Nov 30, 2005 9:49 pm, edited 1 time in total.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

User avatar
RandomEngy
Forum Contributor
Posts: 173
Joined: Wed Jun 26, 2002 3:24 pm
Contact:

Post by RandomEngy »

Ohhhh. I totally missed the overload on that function. Thanks for pointing that out!
Post Reply