I am using mini_magick as the interface of utilizing ImageMagick to manipulate some image. The resize works fine. But when I want to crop some image:
img = MiniMagick::Image.open(url)
img.crop('200x800!')
It constantly prompts No such file
No such file or directory - /var/folders/c4/mqlwdx_d3kj6hqcnvbjr9mn80000gn/T/mini_magick20120504-11111-16kayc1.png
Ah, I was searching with wrong key phrase I guess. The right answer come to me when I search
minimagickinstead ofmini_magick. Undefined Method crop! Using Carrierwave with MiniMagick on rails 3.1.3 especially this answer https://stackoverflow.com/a/9961434/179691I did know the stuff about mini_magick is just a wrapping of
mogrifyand so. The cause of my problem is that-cropaccepts full formatted geometry only. so I changed the expression to:and that works.