Does anyone know how I can get the width and height of an image when taking it out of the database? I want the image constrained to a certain size (with it's proportions the same as the original) when being displayed. For instance, if the image in the database is 1000x500, I want to scale it down to 500x250. I'm useing this code to get it out of the database ..
$type = $row["loc_imagetype"];
$image = $row["loc_image"];
header("Content-type: ".$type);
echo $image;
The above works, but how do I find out the size? I think to use getimagesize, you need an actual link to an image, not the actual image code(which is what the "image" variable holds.
ps .. I prefer not to create a temp file.