How do you convert QImage and QPixmap (that are grayscale) to negative mode? Is there a function for that?
How do you convert QImage and QPixmap (that are grayscale) to negative mode? Is there a function for that?
You have to negate each pixel in the image or negate each colour in the lookup table (depending on the mode of the image). To negate a grayscale color, you can useQt Code:
int v = 255-qGray(color.rgb());To copy to clipboard, switch view to plain text mode
tommy (21st January 2008)
Or you can use QImage::invertPixels
Bookmarks