DiigIT | IT Community
No Profile Image
Welcome Guest
New User? Register | Login

.gif with transparent background issue

By: rekha singh | 10 Mar 2010 3:58 pm

Hi All

Found that PHP does not deal well with gif images that have a transparent background. Played around a bit with code and figured out how to do it. Works just fine on the web server in the basement. Problem is that when I upload the code to the production server in the data center the gif's are not working proper and show up as a black image. If you look hard, you can see an outline of what is in the pix ... barely .. so I know that the correct image being used AND you can create a URL using that image and it comes up correctly in the browser ( both IE and FireFox ).

Both Servers are linux

Basement:
FC11, PHP 5.4.1 Apache 2.2.14 GD 2 MySql 5.0.24a

Data Center:
FC7, PHP 5.4.1 Apache 2.2.4 GD 2 MySql 5.0.24a

I temporarily enabled E_ALL on the production box, but got no PHP errors.

I wrote a 'test' script that shows more information while exercising the GD functions that are needed for transparency and the output is the same on both boxes. Still no errors.

I have trouble with Apache or FC7 causing this as that box has an uptime of almost 800 days and is rock solid in all other aspects. This almost has to be a PHP/GD problem but I don't know where to look now. Ideas anyone?

I did a temporary fix and made the .gif a .jpg with the correct background color; pain in the butt if the background changes ... but

Thanks for listening to my problem!
 

Comments

No Comments Posted for this Article.

Leave a comment

Enter the text in the image
img
Can't read?
Type the characters you see in the picture below.


Close Move