I am using carrierwave(Image Magick) to convert a image as white transparent for Android notification icon.
This my image uploader
class IconUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick
DIMENSIONS = [48,48]
process :white_transparent
def white_transparent
manipulate! do |img|
img.combine_options do |cmd|
cmd.transparent("#ffffff")
cmd.background "rgba(255,255,255,0.0)"
cmd.channel "a"
cmd.separate
cmd.negate
end
img = yield(img) if block_given?
img
end
end
def filename
"notification_icon.png"
end
end
But I am getting the image as 'black on white' instead of "white on black".
Am i missing anything here? Kindly help.
Aucun commentaire:
Enregistrer un commentaire