1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-27 21:24:47 +01:00

Fixed PNG export when the file has not a ".png" extension

This commit is contained in:
Martin Tůma 2020-11-23 22:26:15 +01:00
parent 1b27be6173
commit d1d0341ce5

View File

@ -1069,7 +1069,7 @@ void GUI::exportPNGFile()
p.setRenderHint(QPainter::Antialiasing);
p.fillRect(rect, Qt::white);
plotMainPage(&p, contentRect, 1.0, true);
img.save(_pngExport.fileName);
img.save(_pngExport.fileName, "png");
if (!_tabs.isEmpty() && _options.separateGraphPage) {
QImage img2(_pngExport.size.width(), (int)graphPlotHeight(rect, 1)
@ -1084,7 +1084,7 @@ void GUI::exportPNGFile()
QFileInfo fi(_pngExport.fileName);
img2.save(fi.absolutePath() + "/" + fi.baseName() + "-graphs."
+ fi.suffix());
+ fi.suffix(), "png");
}
}