모든 버전에 적용하려는 전환 수가 있습니다. 내가 minimagick의 resize_and_pad 메서드에 대한 소스를 봤는데 yields to a block 주어진 경우처럼 보입니다. '프로세스'를 호출 할 때 해당 블록을 메소드에 어떻게 가져 옵니까?Carrierwave - resize_and_pad에 블록을 전달하는 방법
do_everything_else = proc { |img|
img.format('jpg') do |i|
i.quality 100
i.antialias
i.background :white
i.flatten
i.unsharp '0.3x0.3+5+0'
end
}
version :croppable, :if => :new_upload? do
# This results in 'too many arguments' error...
process :resize_and_pad => [1200, 1200, 'white', 'Center', do_everything_else]
end