mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
[PR #59] [CLOSED] added option to extract part of an image (manual crop _then_ resize) #254
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#254
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/flyimg/flyimg/pull/59
Author: @WybrenKoelmans
Created: 6/10/2017
Status: ❌ Closed
Base:
master← Head:master📝 Commits (1)
a3931abadded option to extract part of an image (manual crop then resize)📊 Changes
2 files changed (+44 additions, -4 deletions)
View changed files
📝
config/parameters.yml(+11 -2)📝
src/Core/Service/ImageProcessor.php(+33 -2)📄 Description
Before I make a lot of work of creating a proper PR, did I miss something or is it not yet possible to do a crop and then a resize without this?
What I'm doing right now is upload an image to storage. The user can then put a box over the image (like this https://foliotek.github.io/Croppie/) and I save the coords for the white box (viewport) for generating the URLs.
Then I defined an nginx rule like this:
So
becomes
Which will give me exactly what the user cropped in any height and width from the original.
I look forward to your feedback, maybe you know of an easier way or see trouble with this implementation.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.