我想知道如何使用Paperclip将带有alpha通道的PNG和GIF文件转换为白色背景的JPG格式。
我尝试了这个方法,但它并没有起作用。
has_attached_file(
:photo,
:whiny => false,
:styles => {
:medium => ["300x300>", :jpg],
:thumb => ["100x100>", :jpg]
},
:convert_options => { :all => '-alpha white -background white'}
)
它将文件保存为灰色背景。