png8 converter

i did it again.
This commit is contained in:
Jan Schuffenhauer
2019-12-05 17:38:35 +01:00
parent ef65bcd983
commit 44ddebf701
3 changed files with 25 additions and 3 deletions

View File

@@ -111,6 +111,17 @@ bool PaintingArea::saveImage(const QString &fileName, const char *fileFormat)
}
this->assembleLayers(true);
if(!std::strcmp(fileFormat,"PNG")){
QImage visibleImage = Canvas->convertToFormat(QImage::Format_Indexed8);
fileFormat = "png";
if (visibleImage.save(fileName, fileFormat)) {
return true;
} else {
return false;
}
}
if (Canvas->save(fileName, fileFormat)) {
return true;
} else {