Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit ef8d6b5a authored by Boudewijn Rempt's avatar Boudewijn Rempt

Keep the alpha channel when applying the threshold filter

Erasing in Krita means setting alpha to transparent, not
removing actual pixel data.

BUG:394235
(cherry picked from commit 12a72b34)
parent 601e2459
......@@ -89,9 +89,11 @@ void KisFilterThreshold::processImpl(KisPaintDeviceSP device,
while (it.nextPixel()) {
if (device->colorSpace()->intensity8(it.oldRawData()) > threshold) {
white.setOpacity(device->colorSpace()->opacityU8(it.oldRawData()));
memcpy(it.rawData(), white.data(), pixelSize);
}
else {
black.setOpacity(device->colorSpace()->opacityU8(it.oldRawData()));
memcpy(it.rawData(), black.data(), pixelSize);
}
}
......
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