I just tried this:
$srcsize = GetImageSize($img1);
$destImage = imagecreate( $width, $height);
ImageCopyResized( $destImage, $img1, 0, 0, 0, 0, $width, $height, $srcsize[0], $srcsize[1] );
imagejpeg( $destImage );
And it said this:
Warning: Supplied argument is not a valid Image resource
It was having problems with the copy resized part. What am I doing wrong? Does it need a variable name? (BTW, that isn't all of the script.. just the resize part.)