-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[RFC] Refactor image handling #28279
base: master
Are you sure you want to change the base?
Conversation
Nice work, I'll review it tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall a great step forward
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found 100 potential problems in the proposed changes. Check the Files changed tab for more details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Found 100 potential problems in the proposed changes. Check the Files changed tab for more details.
ping @icewind1991 @skjnldsv |
Hello @J0WI, it seems that some of the tickets you mentioned in the original comment have already been addressed so some the points have been addressed. I'm reopening this complex topic and would like to treat this as an "Overview" issue and maybe rescope it to the remaining open issues 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Psalm found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
There are various tickets about poor image handling in Nextcloud.
Nextcloud uses the
OC_Image
wrapper which uses GD. But GD is slow and does not support formats like SVG. That's why some modules (avatar, preview and theming app) have implemented their own image handling.This draft aims to replace the legacy
OC_Image
class with a genericImage
class and a set of compatible backends using GD, Imagick, Gmagick or Vips. It turned out, that theIImage
interface itself does not provide all methods and not all of them are meaningful for all backends (notably the obsolete GD resource). There's also no simple way to add additional file format support.An alternative approach would be to pull a high level image library like intervention/image or imagine/imagine.
The goal is, to provide a generic image handling that uses the fastest backend and all common and modern file types available on the host. And last but not least, to replace direct Imagick usage in avatar, preview and theming app and finally deprecate the legacy
OC_Image
class.