Basically I want to get an image from a form, resize it and then save it to a database. So far I can do this, but I can't seem to find a way of getting the size of the image so I can save that into the database as well.
This is my code so far:
$size = GetImageSize($image);
$width = $size[0];
$height = $size[1];
$dst = ImageCreateTrueColor($newwidth,$newheight);
ob_start();
ImageCopyResampled($dst, $src, 0, 0, 0, 0, $newwidth,$newheight,$width,$height);
ImageJpeg($dst);
$imagedata = ob_get_contents();
ob_end_clean();
ImageDestroy($src);
ImageDestroy($dst);
It works but I don't know how to get the size of the new image ($dst) which is also saved as a string ($imagedata). Any ideas?