[krita] [Bug 445561] Krita 5 opens this PNG corrupted

2021-11-17 Thread vanyossi
https://bugs.kde.org/show_bug.cgi?id=445561

vanyossi  changed:

   What|Removed |Added

 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1

--- Comment #3 from vanyossi  ---
Ok, the patch did not help as libpng is not the issue.

After more testing and getting a kra behave like this I found the problem is
that Krita on macos arm (Rosetta or native) 16bit integer colorspace rendering
is broken. I remember reading the compiler is messing integer casting, I should
check the code and see if this is the issue. Im setting to confirmed.

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 445561] Krita 5 opens this PNG corrupted

2021-11-15 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=445561

--- Comment #2 from amyspark  ---
Does the following patch help?

```
diff --git a/libs/ui/kis_png_converter.cpp b/libs/ui/kis_png_converter.cpp
index 0ec098ff4f..6d6173623b 100644
--- a/libs/ui/kis_png_converter.cpp
+++ b/libs/ui/kis_png_converter.cpp
@@ -490,6 +490,11 @@ KisImportExportErrorCode
KisPNGConverter::buildImage(QIODevice* iod)
 (png_get_valid(png_ptr, info_ptr, PNG_INFO_tRNS))) {
 png_set_expand(png_ptr);
 }
+
+#if defined(PNG_READ_INTERLACING_SUPPORTED)
+png_set_interlace_handling(png_ptr);
+#endif
+
 png_read_update_info(png_ptr, info_ptr);

 // Read information about the png
```

-- 
You are receiving this mail because:
You are watching all bug changes.

[krita] [Bug 445561] Krita 5 opens this PNG corrupted

2021-11-15 Thread amyspark
https://bugs.kde.org/show_bug.cgi?id=445561

amyspark  changed:

   What|Removed |Added

 CC||a...@amyspark.me

--- Comment #1 from amyspark  ---
File imports correctly on Windows (fd399d7a20 (upstream/krita/5.0, krita/5.0)
ASL: reasign UUID for resources that share one).

However, the following is logged:

libpng warning: Interlace handling should be turned on when using
png_read_image

-- 
You are receiving this mail because:
You are watching all bug changes.