+ Reply to Thread
Results 1 to 9 of 9

Thread: Is there a way to upload images only from 100x100pixels?

  1. #1
    bunny.invasion76 is offline x10Hosting Member bunny.invasion76 is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    12

    Question Is there a way to upload images only from 100x100pixels?

    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,

  2. #2
    shant93 is offline x10 Sophmore shant93 is an unknown quantity at this point
    Join Date
    Mar 2010
    Location
    Montreal
    Posts
    117

    Re: Is there a way to upload images only from 100x100pixels?

    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

  3. #3
    vv.bbcc19's Avatar
    vv.bbcc19 is offline Community Advocate vv.bbcc19 is just really nice
    Join Date
    Jun 2010
    Location
    India
    Posts
    1,505

    Re: Is there a way to upload images only from 100x100pixels?

    Quote Originally Posted by bunny.invasion76 View Post
    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,
    Yes there is a round about way.
    Windows + Search folder for image + based on size and copy paste them to a folder.
    Then upload that folder using ftp.
    Seems wierd.But this works for you.

    Regards,
    VVBB
    BCV | Community Support Representative
    █ x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

  4. #4
    lemon-tree's Avatar
    lemon-tree is offline x10 Minion lemon-tree has a spectacular aura about
    Join Date
    Nov 2007
    Posts
    1,420

    Re: Is there a way to upload images only from 100x100pixels?

    @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
    }

  5. #5
    bunny.invasion76 is offline x10Hosting Member bunny.invasion76 is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    12

    Re: Is there a way to upload images only from 100x100pixels?

    Yeah, that's what I mean thanks ;D

  6. #6
    mandy0 is offline x10Hosting Member mandy0 is an unknown quantity at this point
    Join Date
    Feb 2009
    Location
    Mumbai->India
    Posts
    32

    Re: Is there a way to upload images only from 100x100pixels?

    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

  7. #7
    bunny.invasion76 is offline x10Hosting Member bunny.invasion76 is an unknown quantity at this point
    Join Date
    Dec 2010
    Posts
    12

    Re: Is there a way to upload images only from 100x100pixels?

    Yes, I know but sometimes it changes the quality

  8. #8
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: Is there a way to upload images only from 100x100pixels?

    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.

  9. #9
    mr_levi49 is offline x10Hosting Member mr_levi49 is an unknown quantity at this point
    Join Date
    Jan 2011
    Location
    The Netherlands
    Posts
    5

    Re: Is there a way to upload images only from 100x100pixels?

    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

+ Reply to Thread

Similar Threads

  1. coopermine won't upload images
    By p.boomkamp41 in forum Free Hosting
    Replies: 1
    Last Post: 12-24-2010, 12:09 PM
  2. coopermine won't upload images
    By p.boomkamp41 in forum Free Hosting
    Replies: 0
    Last Post: 12-24-2010, 11:52 AM
  3. Where should I upload images to?
    By alex282 in forum Free Hosting
    Replies: 6
    Last Post: 12-27-2009, 05:39 PM
  4. Unable to upload images
    By MK2008 in forum Free Hosting
    Replies: 7
    Last Post: 09-03-2008, 10:38 AM
  5. How to upload images?
    By lambada in forum Scripts & 3rd Party Apps
    Replies: 7
    Last Post: 10-21-2006, 02:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers