Page 1 of 1

detect image dimensions

Posted: Wed Oct 19, 2005 6:36 pm
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?

Posted: Wed Oct 19, 2005 8:55 pm
by feyd
dimensions: getimagesize()

delete: unlink()

Posted: Wed Oct 19, 2005 9:10 pm
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). :)