Foser Posted August 14, 2007 Share Posted August 14, 2007 Im looking for a function that will check the size of the picture prior upload. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/64786-solved-image-size-function-in-pixels/ Share on other sites More sharing options...
reages Posted August 14, 2007 Share Posted August 14, 2007 ...prior upload. that's client-side scripting, javascript or vbscript. regards. Quote Link to comment https://forums.phpfreaks.com/topic/64786-solved-image-size-function-in-pixels/#findComment-323225 Share on other sites More sharing options...
The Bat Posted August 14, 2007 Share Posted August 14, 2007 Of course you could also use getimagesize() in an if statement, and not have the upload continue if the size is not within your desired range. Quote Link to comment https://forums.phpfreaks.com/topic/64786-solved-image-size-function-in-pixels/#findComment-323231 Share on other sites More sharing options...
Foser Posted August 14, 2007 Author Share Posted August 14, 2007 Of course you could also use getimagesize() in an if statement, and not have the upload continue if the size is not within your desired range. Thast exacly what I was looking for thanks! Quote Link to comment https://forums.phpfreaks.com/topic/64786-solved-image-size-function-in-pixels/#findComment-323255 Share on other sites More sharing options...
reages Posted August 14, 2007 Share Posted August 14, 2007 Of course you could also use getimagesize() in an if statement, and not have the upload continue if the size is not within your desired range. doesn't getimagesize() require access to the full content of the image file, that is the image file is already load either in the server or another server? so let's say you have a .php page that receives the file being uploaded. in order for php to process the image file and determine its dimension, the file being uploaded must first finish being uploaded. meaning that the file has already been uploaded before any php is executed, w/c is contrary to what you wanted of "prior upload". Im looking for a function that will check the size of the picture prior upload. now if what you mean is "...check the size of the picture prior to saving the picture in the server.", then getimagesize() fits the bill. regards. Quote Link to comment https://forums.phpfreaks.com/topic/64786-solved-image-size-function-in-pixels/#findComment-323262 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.