From a2f845415c55254db2df0dc0f8dee4ab4aa6da7c Mon Sep 17 00:00:00 2001 From: Ash Holland Date: Sat, 10 Oct 2020 02:13:34 +0100 Subject: [PATCH] Improve pixelation of small areas Previously the level of pixelation would decrease if the selected area was too thin to hold 10 pixelated blocks. Now the level of pixelation only decreases when the selected area is too thin to hold even one pixelated block. This doesn't completely solve the issue of pixelation decreasing when the area is thin, but it significantly improves the situation. --- src/tools/pixelate/pixelatetool.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/pixelate/pixelatetool.cpp b/src/tools/pixelate/pixelatetool.cpp index 6f742279..47831d20 100644 --- a/src/tools/pixelate/pixelatetool.cpp +++ b/src/tools/pixelate/pixelatetool.cpp @@ -89,7 +89,7 @@ void PixelateTool::process(QPainter& painter, int width = selection.width() * (0.5 / qMax(1, m_thickness)); QPixmap t = pixmap.copy(selection); - t = t.scaledToWidth(qMax(width, 10), Qt::SmoothTransformation); + t = t.scaledToWidth(qMax(width, 1), Qt::SmoothTransformation); t = t.scaledToWidth(selection.width()); painter.drawImage(selection, t.toImage()); }