else if (preg_match("/png/i",$userfile_name)) {
echo "$userfile_name is a PNG file ";
$imageinfo = getimagesize($userfile);
$x = $imageinfo[0];
$y = $imageinfo[1];
}
else if (preg_match("/gif/i",$userfile_name)) {
echo "Oh shit, it's a GIF!
";
//$image = imageCreateFromGIF($userfile);
//copy($userfile, "$userfile.gif");
$imageinfo = getimagesize($userfile);
$x = $imageinfo[0];
$y = $imageinfo[1];
//system("/usr/local/bin/convert /tmp/$userfile.png");
}
I've managed to initially work around some of the limitations of GD (specifically, it doesn't write GIF files, although now it allows me to do read-only work with them).
I asked M0xie how he handeled it, and he said he used ImageMagick and recommended standardizing on a single back-end format. I just might do that.