glide icon indicating copy to clipboard operation
glide copied to clipboard

[Feature request] size new option: longe edge and short edge

Open jimblue opened this issue 6 years ago • 4 comments

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 avatar Nov 14 '18 17:11 jimblue

@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?

baileylo avatar Dec 08 '18 18:12 baileylo

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.

jimblue avatar Dec 09 '18 00:12 jimblue

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?

baileylo avatar Dec 18 '18 03:12 baileylo

@jimblue I think you can handle this case with the following parameters:

width: 1500
height: 1500
fit: contain

maximecolin avatar Dec 24 '18 09:12 maximecolin