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++
TIFF: Ignore resolution if set to 0
Freya Lupendce97025f6a3
diff --git a/plugins/impex/tiff/kis_tiff_import.cc b/plugins/impex/tiff/kis_tiff_import.ccindex 541ef9a8ce..937be2f9a3 100644--- a/plugins/impex/tiff/kis_tiff_import.cc+++ b/plugins/impex/tiff/kis_tiff_import.cc@@ -1628,13 +1628,13 @@ KisImportExportErrorCode KisTIFFImport::readTIFFDirectory(KisDocument *m_doc,return ImportExportCodes::FileFormatIncorrect;}- if (TIFFGetField(image, TIFFTAG_XRESOLUTION, &basicInfo.xres) == 0) {+ if (TIFFGetField(image, TIFFTAG_XRESOLUTION, &basicInfo.xres) == 0 || basicInfo.xres == 0) {dbgFile << "Image does not define x resolution";// but we don't stopbasicInfo.xres = 100;}- if (TIFFGetField(image, TIFFTAG_YRESOLUTION, &basicInfo.yres) == 0) {+ if (TIFFGetField(image, TIFFTAG_YRESOLUTION, &basicInfo.yres) == 0 || basicInfo.yres == 0) {dbgFile << "Image does not define y resolution";// but we don't stopbasicInfo.yres = 100;