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
Post a Comment