I tried to convert this command line option to a processor method to use in carrierwave but I couldn't get it to work. I was following the method I saw here.
convert E22725-89PC.jpg -matte -fill none -fuzz 15% -opaque white result.png
Here is my CarrierWave uploader
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