Closed (fixed)
Project:
ImageCache
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Apr 2009 at 08:33 UTC
Updated:
27 Sep 2009 at 20:21 UTC
It would be nice if there were an option to set the size not only by width and/or height but user also could to choose set "long side" and/or "short side" to ...
The idea comes from the IrfanView image viewer/editor software which can resize images this way too.
Comments
Comment #1
drewish commenteddoesn't that achieve the same effect as doing a scale and providing the same dimension for both height and width?
Comment #2
avpadernoComment #3
thamasdrewish,
your solution makes square images (I think), that's not what I need now.
I try to explain better what I'm talking about:
You may have portrait and landscape images. You say: "set the long size to 700px (and keep aspect ratio)!"
This way the dimensions of your portrait image will be width: 450px and height (this is the long side!): 700px, and the dimensions of your landscape image will be width (this is the long side!): 700px and height: 450px.
(Kiam - thanks for correcting my typo!)
Comment #4
Sinan Erdem commentedI think as Drewish says, if you add "Scale" with Height and Width set to the value of the long side you desire, you can achieve what you want.
Example: Scale, width: 500px and height: 500px.
If the image is say 700x450, then it will scale width to 500px, and if the image is 450x700 then it will scale height to 500px.
Try...
Sinan
Comment #5
avpadernoIn that case you must calculate both the value, while in the suggested way you would just set the longer size you want (correct me if I didn't understand correctly).
Comment #6
crosendahl commenteddrewish and etcetera9 are correct. Using just scale (not resize, or scale and crop), you image will be scaled to match the longest dimension. If you set length and width both to 500px and your image is 800x600 your new image will be 500x375, if your image is 600x800 your new image will be 375x500.
Comment #7
drewish commentedComment #9
thamasThanks for your answer. I've read it a long time ago, but forgot to answer. "Scale" works as I needed. Thanks for this fantastic tool.