Skip to content

armgit / krita

Public Imported from GitHub
0

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++

Inherit icc meta in batch exporter

Kitlith ~~1c40376b18da
diff --git a/plugins/python/batch_exporter/Infrastructure.py b/plugins/python/batch_exporter/Infrastructure.py
index 47f8c7c0f3..a88fe6d34e 100644
--- a/plugins/python/batch_exporter/Infrastructure.py
+++ b/plugins/python/batch_exporter/Infrastructure.py
@@ -26,7 +26,13 @@ def nodeToImage(wnode):
"""
Returns an QImage 8-bit sRGB
"""
- icc_profile = (wnode.meta.get("icc") or wnode.cfg["meta"]["icc"])[0]
+ icc_profile = wnode.meta.get("icc")
+ if not icc_profile and self.inherit:
+ icc_profile = wnode.inheritedMetadata().get("icc")
+ if not icc_profile:
+ icc_profile = wnode.cfg["meta"]["icc"]
+
+ icc_profile = icc_profile[0]
[x, y, w, h] = wnode.bounds
conversion_not_needed = (