Page 1 of 1

Collecting image width & height values from a .jpg or .g

Posted: Sun Sep 05, 2004 6:03 pm
by ahelis
Hi all,

I was wondering if there is a function or class in php that would extract the image width and height values when the file is processed by a php script?

I use several generator scripts to build static html content and this is always an issue to produce clean, compliant code.

Any ideas?

Posted: Sun Sep 05, 2004 6:18 pm
by tim
http://www.php.net/image

Note GD may need to be installed, but the functions you'll want to look at are:
imagesx() / gets width
imagesy() / gets height

and also be sure to look at:
http://us2.php.net/manual/en/function.getimagesize.php

Posted: Mon Sep 06, 2004 4:59 pm
by ahelis
Thanks a lot.

You just need to know where to look.

Andrew

Posted: Mon Sep 06, 2004 6:12 pm
by tim
your welcome

:D