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.
This commit is contained in:
committed by
borgmanJeremy
parent
22ae116f29
commit
a2f845415c
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user