-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Convert images to RGB and strip metadata #37
Conversation
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.
LGTM, however, the upstream PR seems to break stuff.
does that work with all implementations? Or will we get an exception e.g. when using GD? |
Yes, it works with all Imagine implementations. In GD |
It seems that the GDlib does not handle palette conversions very well: http://stackoverflow.com/questions/12815305/bad-cmyk-to-rgb-conversion-with-gd Therefore, do we really need this step? |
With GD, the behavior before and after this pull request is exactly the same, see #37 (comment) But with Gmagick and Imagick, the image is converted to RGB and profiles and metadata get stripped from the image. We can make the conversion to RGB configurable, I’m not sure if |
Ok, sorry for not reading thoroughly. Then we do not need this to be configurable I think. |
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.
The only problem I see here is that resizer settings should be considered in the cache key.
If we don’t make them configurable, they are not “settings” I think and are not needed in the cache key then because they can’t change. |
Fine with me then :) I think I'll only test it on a real life project once the php-imagine/Imagine#564 discussion has found an end, ok? |
I think you can test on real life project already. It looks like the issue from php-imagine/Imagine#564 was related to my installation of ImageMagick because the delegate |
be649eb
to
ba38061
Compare
Fixes #34
Blocked on contao/imagine-svg#7 and php-imagine/Imagine#564.