PDA

View Full Version : change needed where ext == gif


Anonymous
10-08-2004, 06:58 PM
Hey I set this GREAT program up for my wife and only had one minor (although illusive) problem.

I was getting an error anytime I uploaded a gif file-

Warning: imagejpeg(): supplied argument is not a valid Image resource in /raid0/home/maysaf/public_html/vixandco.com/admin/index.php on line 812


I managed to trace it back through the logic however for imagejpeg- the problem is on line 797, which states

} else if ($ext == 'gif') {
$img = @imagecreatefrompng($image_path);
}


So yeah- imagecreatefrompng isn't gonna work here. I changed it as follows:

} else if ($ext == 'gif') {
$img = @imagecreatefromgif($image_path);
}


and presto the world is beautiful again.


thanks for all your hard work! and I'm glad to be able to contribute.[/code]

pixelpunk
10-08-2004, 07:01 PM
Oups, sorry 'bout that.

Very happy you spotted it, will upload a new version at once!

thank you // punkpixel

andrew
10-08-2004, 07:10 PM
Hey it's my pleasure. I'll be making a template for the site soon as well. It's great work you've done.