Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Joshua Eichorn's Blog:
Problems with GD
Oct 11, 2005 @ 16:09:20

In hsi latest blog entry today, Joshua Eichorn looks a the graphics library bundled with PHP - GD - and some of the problems he's seeing with it.

In a recent project, I had the joy (make that pain) of using GD a lot. The project was an update to the a facial composite tool for Identikit. The new code isn’t live yet, its still in final testing, but its all done for me except for a bit of final bug fixing.

Anyway the app is written in Flash and integrates with PHP for things like saving files to the database or creating a jpeg for the user to save. The problem I ran into with GD is it doesn’t repect an images transparency. So my basic test of this is, open an transparent Image and resize then output the image.

The problem he has is that, when the resizes and samples the image (with the transparency), it looses the transparency inside the image (in this case, some glasses). So, if you've had an issue like this before or know a quick fix to this happening in PHP/GD, drop him a line...

tagged:

Link:


Trending Topics: