Hi,
I've got a question: Is there a way to upload images only from 100x100pixels?
Not when you upload that it changes to 100x100 pixels, only that you can upload images from 100x100 pixels...
Greets,
Hi,
I've got a question: Is there a way to upload images only from 100x100pixels?
Not when you upload that it changes to 100x100 pixels, only that you can upload images from 100x100 pixels...
Greets,
I'm not sure what you mean, but if you're asking how to filter images by size, just check them with the PHP getimagesize() function.
http://php.net/manual/en/function.getimagesize.php
█ BCV | Community Support Representative
█ x10Hosting - Giving Away Hosting Since 2004
█ Premium Hosting | VPS Services
@vv.bbcc19: I think he/she is referring to imposing that restriction on files uploaded through a PHP script and form, not files that they want to upload themselves.
@bunny.invasion76:
Code://Assuming you've checked the file is valid and there etc: $filePath = $_FILES['namefromform']['tmp_name']; $imageDimensions = getimagesize($filePath); if($imageDimensions[0] === 100 && $imageDimensions[1] === 100){ //Dimensions are 100 x 100 }else{ //Dimensions are not 100 x 100 }
Yeah, that's what I mean thanks ;D
Another thing you can do.. let image be of any size create it's thumbnail of size 100*100 and upload it ;)
Mobile Blog Latest technologies,Devices,features,prices etc. General blog containing Tips and tricks related to computer,software reviews,linux stuff,antivirus reviews ,antispyware reviews etcs.
http://www.techcity.info/blog
Yes, I know but sometimes it changes the quality
Note that if using PHP, you can only check the image size after the upload, which may work fine for your purposes. If you need to check before uploading, you'll need something special client side, such as a Flash uploader.
Last edited by misson; 01-01-2011 at 04:29 PM.
Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.Misson, not Mission.
You mean like: www.tinypic.com?
you can upload a picture and:
- get a link for it
- get an image for forums/emails
Hope you like it![]()