How can you tell the dimensions of a .jpeg or .png file without opening it?
If it is impossible to determine the dimensions, how can I automatically crop an image?
I am using PHP and JS.
How can you tell the dimensions of a .jpeg or .png file without opening it?
If it is impossible to determine the dimensions, how can I automatically crop an image?
I am using PHP and JS.
list($width, $height) = getimagesize("img.jpg");
or
$im=imagecreatefromjpeg("image_testin_1.JPG");
imagetruecolortopalette($im, false, 255);
$w = imagesx($im);//provide width of full page
$h = imagesy($im);//provide height of full page