How to check the resolution of an image?

Discussion in 'PHP' started by durgesh871, Jun 30, 2010.

  1. #1
    please give an idea how to check the resolution of an image during saving....

    example i have to save an image that is not greater than 100dpi....so if the user try to save greater than 100dpi there will be an alert message..
     
    durgesh871, Jun 30, 2010 IP
  2. webal

    webal Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're using PHP with GD support, you can try getimagesize().
     
    webal, Jul 3, 2010 IP
  3. k8triton

    k8triton Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I think, you can not get DPI information with PHP. You can check the resolution with getimagesize() function.
     
    k8triton, Jul 3, 2010 IP
  4. strgraphics

    strgraphics Active Member

    Messages:
    710
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #4
    getimagesize("-------image url------ or image.jpg")

    Thats it. we can get allll the information about that image.
     
    strgraphics, Jul 3, 2010 IP