Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview API: different aspect ratio / scale options #31268

Open
felix-schwarz opened this issue Apr 25, 2018 · 4 comments
Open

Preview API: different aspect ratio / scale options #31268

felix-schwarz opened this issue Apr 25, 2018 · 4 comments

Comments

@felix-schwarz
Copy link

Talking with @DeepDiver1975 about the Preview API, the topic of aspect ratio scaling came up. Right now, it appears the y parameter is ignored if the aspect ratio parameter a is set.

This works for wide images, but would return a larger-than-requested image for portrait images.

Landscape Example:

  • image size: 200 x 100
  • maximum size: 20 x 20
  • returned image size: 20 x 10

Portrait Example:

  • image size: 100 x 200
  • maximum size: 20 x 20
  • returned image size: 20 x 40

Ideally, Preview API would allow clients to pick one of these scaling methods:

  • ignore: ignore aspect ratio

  • aspect fit: scale image to fit the requested size while maintaining the aspect ratio. The resulting image can be smaller than the requested size.

  • aspect fill: scale image to fill the requested size while maintaining the aspect ratio, cutting off parts of the image if needed. The resulting image is exactly the requested size.

@felix-schwarz felix-schwarz changed the title Preview API: different aspect ratio scale options Preview API: different aspect ratio / scale options Apr 25, 2018
@ownclouders
Copy link
Contributor

GitMate.io thinks possibly related issues are #13516 (Previews with aspect ratio need to be properly cached), #16551 (Thumbnail API asks for a preview twice each time), #19548 (Add option to configure preview (and thumbnail, ect.) location), #19958 (Streaming API?), and #6550 ("Enable Previews" config option should default to "false").

@michaelstingl
Copy link

michaelstingl commented May 8, 2018

There have been some limitations in the past:

Maybe this can be done right with the new implementation…

@ownclouders
Copy link
Contributor

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.)

@stale
Copy link

stale bot commented Sep 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants