Fix recoloring of inverted colors.

BUG: 368229
parent ebeeac8d
......@@ -896,9 +896,9 @@ void PagePainter::recolor(QImage *image, const QColor &foreground, const QColor
for (int x=0; x<image->width(); x++) {
const int lightness = qGray(pixels[x]);
pixels[x] = qRgba(scaleRed * lightness,
scaleGreen * lightness,
scaleBlue * lightness,
pixels[x] = qRgba(scaleRed * lightness + foreground.red(),
scaleGreen * lightness + foreground.green(),
scaleBlue * lightness + foreground.blue(),
qAlpha(pixels[x]));
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment