Fix clang compile warnings

This commit is contained in:
Gavin MacGregor
2025-01-19 19:22:09 +00:00
parent 6e4f1df285
commit df1122f621
4 changed files with 8 additions and 7 deletions

View File

@@ -264,7 +264,7 @@ void MainWindow::exportImage()
QImage scaledImage[6];
for (int p=0; p<6; p++)
if (!interImage[p].isNull())
if (!interImage[p].isNull()) {
if (m_viewAspectRatio == 3)
// Aspect ratio is Pixel 1:2 so we only need to double the vertical height
scaledImage[p] = interImage[p].scaled(interImage[p].width(), interImage[p].height()*2, Qt::IgnoreAspectRatio, Qt::FastTransformation);
@@ -276,6 +276,7 @@ void MainWindow::exportImage()
// Don't smooth GIF as it's bound to break the 256 colour limit
scaledImage[p] = doubleHeightImage.scaled((int)((float)doubleHeightImage.width() * aspectRatioHorizontalScaling[m_viewAspectRatio] * 2), doubleHeightImage.height(), Qt::IgnoreAspectRatio, (suffix == "gif") ? Qt::FastTransformation : Qt::SmoothTransformation);
}
}
if (suffix == "png") {
if (scaledImage[0].save(exportFileName, "PNG"))