Я попытался преобразовать эту опцию командной строки в метод процессора, чтобы использовать в carrierwave, но я не смог заставить его работать.Я следовал методу , который видел здесь .
convert E22725-89PC.jpg -matte -fill none -fuzz 15% -opaque white result.png
Вот мой загрузчик CarrierWave
class ImageUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
storage :file
def store_dir
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
process :remove_background => 'white'
def remove_background(color)
manipulate! do |img|
img = img.format 'png'
img = img.matte
img = img.fill 'none'
img = img.fuzz '15%'
img = img.opaque color
end
end
end