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

Need help with Photoshop, the GIMP, Illustrator, or others? Want to show off your work? Looking for advice on your newest Flash stuff?

Moderator: General Moderators

Post Reply
ahelis
Forum Newbie
Posts: 2
Joined: Sun Sep 05, 2004 5:51 pm
Location: Fremont, Calif USA

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

Post 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?
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post 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
ahelis
Forum Newbie
Posts: 2
Joined: Sun Sep 05, 2004 5:51 pm
Location: Fremont, Calif USA

Post by ahelis »

Thanks a lot.

You just need to know where to look.

Andrew
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

your welcome

:D
Post Reply