06-04-2008, 07:42 PM
|
#2 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
For one thing, you're creating $source twice. And you may be able to forgo the imagealphablending() in favour of just using imagecopyresampled(). Try this after your switch statement?
PHP Code:
$dimg = imagecreatetruecolor($newwidth, $newheight); imagecopyresampled($dimg, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); $filename="$output_dir/test1.gif"; if (imagegif($dimg, $filename)) { imagedestroy($dimg); imagedestroy($source); return true; } else { imagedestroy($dimg); imagedestroy($source); return false; }
I would've rewritten the whole thing just to be sure, but I'm in the middle of cleaning my bedroom. Between my wife and the pets, it's hurricane katrina in there.
-m
|
|
|
|