Image resize class

Discussion in 'PHP' started by Triexa, Apr 3, 2007.

  1. #1
    Frankly I'm too lazy to make my own so can anyone recommend a good php class to resize images? I only need to resize JPG the only important thing is

    say my picture is 700x600. I'd like to specify a max width/height of 100x100, and it will resize to 100x86 rather than transforming it to 100x100.

    Thanks!
     
    Triexa, Apr 3, 2007 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,842
    Likes Received:
    4,543
    Best Answers:
    123
    Trophy Points:
    665
    #2
    sarahk, Apr 3, 2007 IP
  3. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #3
    Or Google: phpthumb
     
    nico_swd, Apr 3, 2007 IP
  4. Triexa

    Triexa Active Member

    Messages:
    580
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #4
    I'm looking into imagemagick now...

    I couldn't really find any relevant info on google, so...

    which is faster, based purely on image resizing? ImageMagick or GD?
     
    Triexa, Apr 3, 2007 IP
  5. jitesh

    jitesh Peon

    Messages:
    81
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    I have attached a script. which is working to resize jpg,png,gif and bmp images.
    (Using GD library)

    By the way image resize script calculate a aspect ratio for your given dimensions.
    So this is the reson why you are getting 100x86.
     

    Attached Files:

    • ir2.zip
      File size:
      52.9 KB
      Views:
      85
    jitesh, Apr 3, 2007 IP
  6. kthnx

    kthnx Peon

    Messages:
    6
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    GD is the way to go in my opinion, it's all I've ever used tho so slight bias ;)
    Best of luck!
     
    kthnx, Apr 4, 2007 IP
  7. ZYSeo

    ZYSeo Peon

    Messages:
    164
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    ImageMagic is good class for image working under PHP.
     
    ZYSeo, Apr 4, 2007 IP