eltiare / carrierwave-vips

CarrierWave image processing powered by VIPS
MIT License
92 stars 39 forks source link

Delegate libvips processing to ImageProcessing gem #29

Closed janko closed 6 years ago

janko commented 6 years ago

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

The ImageProcessing gem automatically pulls in ruby-vips >= 2.0.10 as a dependency, so we remove it from the gemspec. ImageProcessing uses the improved vips_thumbnail(), so it depends on libvips 8.6+. It also uses vips_autorot() for autorotation.

This PR additionally adds the #resize_to_pad method.

Closes #28 Closes #27 Closes #19

eltiare commented 6 years ago

I'm not using Ruby a whole lot these days. Feel free to use the code to make a new gem with ImageProcessing based on this code.