RMagick: Method to invert the colors of an image

Hi,

I am using RMagick gem to work with images. In one of my methods, I want
to totally invert the colors of the image file. I searched the Rmagick
API but am not able to converge to a method which can do so (Probably,
there exists one, but I am not able to find it)

Can anyone please tell if there is any method in RMagick to accomplish
this task?

Thanks,
Anukul

···

--
Posted via http://www.ruby-forum.com/.

I guess you want to negate the colors.

Refer to http://studio.imagemagick.org/RMagick/doc/image2.html#negate

Regards,

Park Heesob

···

2008/10/23 Anukul Singhal <anukul.singhal@gmail.com>:

Hi,

I am using RMagick gem to work with images. In one of my methods, I want
to totally invert the colors of the image file. I searched the Rmagick
API but am not able to converge to a method which can do so (Probably,
there exists one, but I am not able to find it)

Can anyone please tell if there is any method in RMagick to accomplish
this task?