hi, i'm making a kind of profile area for my site, and i'm allowing the user to have a profile picture which they link to from another site.
is there anyway for me to automatically check the dimensions of the picture before it is chosen, say that it is under 400x400 pixels?
check picture size(dimensions)
Moderator: General Moderators
- itsmani1
- Forum Regular
- Posts: 791
- Joined: Mon Sep 29, 2003 2:26 am
- Location: Islamabad Pakistan
- Contact:
getimagesize()
getimagesize -- Get the size of an image
Description
array getimagesize ( string filename [, array imageinfo])
The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2, JPX, JB2, JPC, XBM, or WBMP image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag.
You just get the imagesize and then check weather it is acceptable to the size that you have Standardized or not if yes then use it else leave a message that "Change the size of image"
getimagesize -- Get the size of an image
Description
array getimagesize ( string filename [, array imageinfo])
The getimagesize() function will determine the size of any GIF, JPG, PNG, SWF, SWC, PSD, TIFF, BMP, IFF, JP2, JPX, JB2, JPC, XBM, or WBMP image file and return the dimensions along with the file type and a height/width text string to be used inside a normal HTML IMG tag.
You just get the imagesize and then check weather it is acceptable to the size that you have Standardized or not if yes then use it else leave a message that "Change the size of image"
- itsmani1
- Forum Regular
- Posts: 791
- Joined: Mon Sep 29, 2003 2:26 am
- Location: Islamabad Pakistan
- Contact:
http://www.php.net/manual/en/function.getimagesize.php
All the informition about the above function.....
All the informition about the above function.....