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:
Yuriy Puchkov
2020-10-11 20:49:15 +03:00
26 changed files with 153 additions and 71 deletions

View File

@@ -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());
}
}