samedi 4 avril 2015

Using rmagick to colorize an image like in photoshop

So I have this base image:


enter image description here


And in photoshop I do a basic layer color overlay, with the rgb colors:


r: 244, g: 93, b: 0


This gives me the amazingly vibrant:


enter image description here


What I'm trying to do is colorize the same image in rmagick, so if I do the following colorize:



img = Magick::Image.read('brush.png').first
img = img.colorize(100, 100, 100, Magick::Pixel.new(244, 93, 0, 1))
img.format = 'png'
img.to_blob


It gives me this really washed out orange image:


enter image description here


My questions is, how do I colorize this image with those rgb params in imagemagick / rmagick, to get the same vibrant color that I got in photoshop.


Thanks.


Aucun commentaire:

Enregistrer un commentaire