ruby on rails 3 - MiniMagic resize -


im using minimagick resize images on server. having issues forcing dimensions on it. minimagick git documentation states uses mogrify commands. looking further, there sever commands can use in resize such as:

-resize "230x200>" -resize "230x200<" -resize "230x200!"

i looking use ! seems not working.

     img = sftp.download!("local_promos/#{@image_name}")        ri = minimagick::image.read(img)      ri.resize "230x200!" # ! ignored , not resize      ri.write('#{img_dir}#{@image_name}') 

i ran mogrify command in command , worked fine. seems issue?

the problem gem mini_magic. using -v 3.5.0. escaping string using shellwords.escape(value.to_s) newer version 3.6.0 fixed issue.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -