Transparency Gd Library (Easy)

I have a red image with blue text and am trying to make the red  in the image transparent... it doesnt work.. Any ideas??

  $image       = 'ImageManipulation/TemoraryImages/blue.gif';
    $image       = imagecreatefromgif($image);
    //Make transparent all red in the image
    $MakeTrans   = imageColorAllocate($image, 255,0,0);

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I don't know much about images, I know some people here do though, so i'll just do my basic error checking =)
Are you sure the color that your trying to make transparent is exactly (255,0,0)?
Joe P
boss234Author Commented:
Yes, i just made it to test the code.
The problem is that you create a new red palette entry and make that transparent.
The original red pixels still remain red. You should find the palette index used for red pixels and make it transparent.
I'm now looking for the php function to read the palette.
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

I've found it: the palette index of the red color can be retieved by the imagecolorexact function.
boss234Author Commented:
Thanks pallosp - - i get a pallet index of ZERO (0) is this right?

If making the 0th element transparent solves your problem, definitely it is right.
-1 means that the given color doesn't exist, so 0 can be a right index.
You may check it by a photo editor that is able to display the palette of an image (such as Paint Shop Pro).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.