#1
  1. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,660
    Rep Power
    171

    Resizing images just for preview using imagick


    Hello; How can I use imagick to re-size (but not save) this images when page loads?

    Here is the page, as you can see they are stretched.

    Thanks
  2. #2
  3. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    Resizing pictures is time consuming. if you're going to do it, do it once.

    That being said, the reason why they're "stretched" is because you don't respect their aspect ratios. These pictures are not rectangular, you're forcing them into rectangular boxes. Set a height or a width only (height in your case) and let the browser maintain the right ratio.

    The only correct solution, however, is to save the images the right size to begin with.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.
  4. #3
  5. A Change of Season
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2004
    Location
    Next Door
    Posts
    2,660
    Rep Power
    171
    Originally Posted by ManiacDan
    Resizing pictures is time consuming. if you're going to do it, do it once.

    That being said, the reason why they're "stretched" is because you don't respect their aspect ratios. These pictures are not rectangular, you're forcing them into rectangular boxes. Set a height or a width only (height in your case) and let the browser maintain the right ratio.

    The only correct solution, however, is to save the images the right size to begin with.
    Um, I already have that happening on upload. The thing is the big boss keeps changing his mind about the design. Every once in a while we have a new design!
  6. #4
  7. Sarcky
    Devshed Supreme Being (6500+ posts)

    Join Date
    Oct 2006
    Location
    Pennsylvania, USA
    Posts
    10,908
    Rep Power
    6351
    Resize them when the boss changes his mind. Mention that it takes you an hour. Having a bad boss doesn't change the right answer.
    HEY! YOU! Read the New User Guide and Forum Rules

    "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin

    "The greatest tragedy of this changing society is that people who never knew what it was like before will simply assume that this is the way things are supposed to be." -2600 Magazine, Fall 2002

    Think we're being rude? Maybe you asked a bad question or you're a Help Vampire. Trying to argue intelligently? Please read this.

IMN logo majestic logo threadwatch logo seochat tools logo