Commit eef2caf3 authored by Halla Rempt's avatar Halla Rempt
Browse files

Convert the brushtip image to grayscale if it's a mask

CCBUG:405693
parent 81407392
...@@ -103,14 +103,15 @@ bool KisPngBrush::loadFromDevice(QIODevice *dev) ...@@ -103,14 +103,15 @@ bool KisPngBrush::loadFromDevice(QIODevice *dev)
return false; return false;
} }
setBrushTipImage(image);
setValid(true); setValid(true);
if (brushTipImage().allGray()) { if (brushTipImage().allGray()) {
setBrushTipImage(image.convertToFormat(QImage::Format_Grayscale8));
setBrushType(MASK); setBrushType(MASK);
setHasColor(false); setHasColor(false);
} }
else { else {
setBrushTipImage(image);
setBrushType(IMAGE); setBrushType(IMAGE);
setHasColor(true); setHasColor(true);
} }
......
Supports Markdown
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