开发者

how to write this where paperclipe understands

开发者 https://www.devze.com 2022-12-21 19:43 出处:网络
I can do this command to resize an image to fit a specific size on the command line with Imagemagick. How do I tell paperclip can do the same开发者_运维技巧 when I upload an image:

I can do this command to resize an image to fit a specific size on the command line with Imagemagick. How do I tell paperclip can do the same开发者_运维技巧 when I upload an image:

convert Bisiye2.jpg -thumbnail '150x150^' -gravity center -extent 150x150 Bisiye2_tofit.jpg


  has_attached_file :image, :styles => { :thumb => "150x150>" }, 
    :convert_options => {:thumb => "-gravity center -extent 150x150"}
0

精彩评论

暂无评论...
验证码 换一张
取 消