class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
Is there a way to determine the size (in pixels) of an uploaded image? I need this to prevent uploading of images wich are bigger then a certain size...Reply
Using these, only the images bigger than 300x200 pixels will be resized, conserving ratio. Smaller images won't be resized as long as they fit within the dimensions.Reply
After calling $foo->process(), you can read some class variables to obtain this information:
But, for your specific problem, you should simply have the class to resize images that are too big. Use the following settings:
Using these, only the images bigger than 300x200 pixels will be resized, conserving ratio. Smaller images won't be resized as long as they fit within the dimensions.