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

Delegate MiniMagick processing to ImageProcessing gem #2298

Merged
merged 3 commits into from Mar 30, 2019

Conversation

janko
Copy link
Contributor

@janko janko commented Apr 5, 2018

ImageProcessing gem is a wrapper gem around MiniMagick and libvips, which implements common resizing macros. Instead of the CarrierWave project having to maintain those macros, it can use the ImageProcessing to do the heavy lifting for us. The ImageProcessing gem will constantly get updated with best practices, so any bug fixes and performance improvements there will automatically benefit CarrierWave.

Some improvements that ImageProcessing gem adds on top of MiniMagick is automatic orientation and thumbnail sharpening. I just published a blog post about ImageProcessing.

This PR still maintains backwards compatibility by leaving the #manipulate! method around, and yielding the MiniMagick::Image object in processing methods (even though that should be considered deprecated). But it's recommended to use #minimagick!, as it exposes the much more flexible ImageProcessing::Builder object.

The ImageProcessing gem automatically pulls in mini_magick as a dependency, so this step can now be removed from the user setup.

Should fix #2157
Fixes #2062

ImageProcessing gem is a wrapper gem around MiniMagick, which implements
common resizing macros. Instead of us having to maintain those macros,
we can use the ImageProcessing to do the heavy lifting for us.

We still maintain backwards compatibility by leaving the #manipulate!
method around, and yielding the MiniMagick::Image object in processing
methods (even though that should be considered deprecated).
@janko janko force-pushed the switch-to-image_processing branch from 63151b4 to 3ba83f9 Compare April 5, 2018 14:30
@0rvar
Copy link

0rvar commented Jun 24, 2018

It would be great to get this PR fixed up and merged

@mshibuya mshibuya added this to the Release v2.0.0 milestone Jul 17, 2018
@mshibuya mshibuya merged commit 28beee7 into carrierwaveuploader:master Mar 30, 2019
@mshibuya
Copy link
Member

Awesome, thanks!

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

Successfully merging this pull request may close these issues.

MiniMagick resize_and_pad does not pad Performance drop of MiniMagick::Image.open vs. MiniMagick::Image.new
3 participants