-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature(thumbnails): add the ability to define custom image processors (
#7409) * feature(thumbnails): add the ability to define custom image processors * fix(ci): add exported member comment * docs(thumbnails): mention processors in readme * fix: codacy and code review feedback * fix: thumbnail readme markdown Co-authored-by: Martin <github@diemattels.at> --------- Co-authored-by: Martin <github@diemattels.at>
- Loading branch information
Showing
18 changed files
with
458 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
Enhancement: Thumbnail generation with image processors | ||
|
||
Thumbnails can now be changed during creation, previously the images were always scaled to fit the given frame, | ||
but it could happen that the images were cut off because they could not be placed better due to the aspect ratio. | ||
|
||
This pr introduces the possibility of specifying how the behavior should be, following processors are available | ||
|
||
* resize | ||
* fit | ||
* fill | ||
* thumbnail | ||
|
||
the processor can be applied by adding the processor query param to the request, e.g. `processor=fit`, `processor=fill`, ... | ||
|
||
to find out more how the individual processors work please read https://github.com/disintegration/imaging | ||
|
||
if no processor is provided it behaves the same as before (resize for gif's and thumbnail for all other) | ||
|
||
https://github.com/owncloud/ocis/pull/7409 | ||
https://github.com/owncloud/enterprise/issues/6057 | ||
https://github.com/owncloud/ocis/issues/5179 | ||
https://github.com/owncloud/web/issues/7728 |
116 changes: 63 additions & 53 deletions
116
protogen/gen/ocis/services/thumbnails/v0/thumbnails.pb.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.