image height and width

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
loongest
Forum Commoner
Posts: 25
Joined: Wed Apr 07, 2004 12:23 pm

image height and width

Post by loongest »

can anyone guide me some direction for the image file dimension ?

thanks : )
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Code: Select all

//	Get the dimensions of the image
	$size = getimagesize($file_tmp_name);
	$image_width = $size[0];
	$image_height = $size[1];
where $file_tmp_name is the FULL PATH and NAME of the image you want to inspect.
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

for a lil bit better example and further explanation, always go to the manual

http://us3.php.net/manual/en/function.getimagesize.php

:wink: :wink:
Post Reply