glide
glide copied to clipboard
[Feature request] size new option: longe edge and short edge
Resizing Image: Long Edge and Short Edge
This is extremely handy when having landscape and portrait photo. Should automatically adjust the rest of the dimensions.
@jimblue I'm not sure exactly what you're asking for. Can you provide dimensions, what dimensions you're putting in then the dimensions after resize?
It's a feature you can found in many photography software like Capture One or Lightroom. You'll probably better understand with the following exemple.
Let's say we have two photos to play with:
-
photo_1
=> 3000x1500 -
photo_2
=> 1500x3000
We want to resize both to 1500x750
or 750x1500
depending on the photo orientation.
If we simply use with=1500
we will get:
-
photo_1
=> 1500x750 -
photo_2
=> 1500x3000
This is not what we want...
That's where longe edge and short edge are very handy.
Our goal is to "programatically" say that we want the longer edge of any photo to be 1500 while keeping the aspect ratio.
Know you get:
-
photo_1
=> 1500x750 -
photo_2
=> 750x1500
Short edge work on the same principale, you get the idea.
I'm curious what your use case is. I've worked with on demand image resizers and will say that I've seen this feature, but I haven't seen it used. From my experience the general use case is I have a spot that is x pixels wide and I need this image to fit in it. This is a different use case from what your suggesting, I'm curious if you could tell me what you're doing with it?
@jimblue I think you can handle this case with the following parameters:
width: 1500
height: 1500
fit: contain