detect image dimensions

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
jaymoore_299
Forum Contributor
Posts: 128
Joined: Wed May 11, 2005 6:40 pm
Contact:

detect image dimensions

Post by jaymoore_299 »

How do you determine what an image file, such as a jpeg's dimensions are?
If I have an upload form, how would I automatically delete images that are too big vertically or horizontally?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

dimensions: getimagesize()

delete: unlink()
Dm7
Forum Commoner
Posts: 67
Joined: Sat Oct 08, 2005 9:16 pm
Location: USA

Post by Dm7 »

imagesy() and imagesx() are useful too if you don't want to use list(); function or whatever to get seperate sizes (width and height). :)
Post Reply