Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.
C++
Fix TIFF file size bloating after each overwrite
Igor Danilets20ca858c2d91
diff --git a/plugins/impex/tiff/kis_tiff_export.cc b/plugins/impex/tiff/kis_tiff_export.ccindex 20e4b69280..9892e13a71 100644--- a/plugins/impex/tiff/kis_tiff_export.cc+++ b/plugins/impex/tiff/kis_tiff_export.cc@@ -106,7 +106,7 @@ KisImportExportErrorCode KisTIFFExport::convert(KisDocument *document, QIODeviceKIS_ASSERT_RECOVER_RETURN_VALUE(kisimage, ImportExportCodes::InternalError);QFile file(filename());- if (!file.open(QFile::ReadWrite)) {+ if (!file.open(QFile::ReadWrite | QFile::Truncate)) {return {KisImportExportErrorCannotRead(file.error())};}