Merge branch 'flameshot-org-master' into bugfix/memory-leak
# Conflicts: # .github/workflows/Linux-pack.yml # CMakeLists.txt # data/graphics.qrc # src/config/configwindow.cpp # src/tools/imgur/imguruploader.cpp
This commit is contained in:
@@ -90,10 +90,12 @@ void PixelateTool::process(QPainter& painter,
|
||||
}
|
||||
} else {
|
||||
int width = selection.width() * (0.5 / qMax(1, m_thickness));
|
||||
int height = selection.height() * (0.5 / qMax(1, m_thickness));
|
||||
QSize size = QSize(qMax(width, 1), qMax(height, 1));
|
||||
|
||||
QPixmap t = pixmap.copy(selection);
|
||||
t = t.scaledToWidth(qMax(width, 10), Qt::SmoothTransformation);
|
||||
t = t.scaledToWidth(selection.width());
|
||||
t = t.scaled(size, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||
t = t.scaled(selection.width(), selection.height());
|
||||
painter.drawImage(selection, t.toImage());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user