Wednesday, January 11, 2006

GD Said What?

I recently had a problem where images that were supposed to be edited into three different sizes by the GD module within Apache were simply being copied to a new folder. I got three images, and their file sizes were different from the original, but their height and width were identical to the original photo.

Turns out that it was the GD module's doing -- it seems that JPEG support wasn't enabled, so rather than fail it just sort of faked it, copying the images, but not really manipulating them. I figured out what it was up to by running this bit of PHP code:

$gd = var_dump(gd_info());
print_r($gd);

gd_info snags the GD settings and throws them into an array that I then dumped. That's what told me that JPEG support was set to "false". So now you know ... and knowing is half the battle!

No comments: