Here is my thumbnail function. It creates the image, but it makes a 0 byte file that (obviously) won't show up. Any idea what's wrong?
function createThumbnail($img, $new_img, $width, $height) {
$src_img = imagecreatefromjpeg($img);
$dest_img = imageCreate($new_w, $new_h);
echo "Width: $width || Height: $height <br>";
$resize = imageCopyResized($dest_img, $src_img, 0, 0, 0, 0, $width, $height, ImageSX($src_img), ImageSY($src_img));
$imgjpg = imagejpeg($dest_img, $new_img, 80);
imagedestroy($src_img);
echo "imageCreate: $dest_img <br>";
echo "imageCopyResized: $resize <br>";
echo "imageJpeg: $imgjpg <br>";
}