在回形針,例如,它可以添加此功能來設置白色背景時巴紐轉換爲JPG格式:Carrierwave PNG到JPG轉換器。如何避免黑色背景?
:convert_options => { :all => '-background white -flatten +matte'}
一旦carrierwave使用rmagick過,那怎麼辦?
Obs .:我的文件存儲在S3中。
我的代碼:
version :square do
process :resize_to_fill => [200, 200]
process :convert => 'jpg'
end