RMagick: Method to invert the colors of an image


#1

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


#2

2008/10/23 Anukul S. removed_email_address@domain.invalid:

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?

I guess you want to negate the colors.

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

Regards,

Park H.