Search code examples
rubyresizeimagemagickcroprmagick

How to resize an image with Rmagick crop if necessary.


I'm trying to create an image server that is riapi (https://github.com/riapi/riapi/blob/master/level-1.md) compliant. One of the required resize modes is crop (the image will be minimally cropped evenly to match the required aspect ratio). Anyone know which of Rmagick's million methods I'm looking for?


Solution

  • Looks like resize_to_fill does what I was looking for. I just miss-read the documentation.