I have several images in a MySQL database, each of which is stored in BLOB fields. How to estimate the width and height of images in pixels?
Let's say you got the image from the blob field in the database via mysqli_query and assigned it the $ image variable . You can use this code:
$im = imagecreatefromstring($image); $width = imagesx($im); $height = imagesy($im);