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

Fix imporitng multilayered jpegxl files

Dmitry Kazakovef113caf57c8
diff --git a/plugins/impex/jxl/JPEGXLImport.cpp b/plugins/impex/jxl/JPEGXLImport.cpp
index b50494edc5..a2f73ab887 100644
--- a/plugins/impex/jxl/JPEGXLImport.cpp
+++ b/plugins/impex/jxl/JPEGXLImport.cpp
@@ -874,7 +874,9 @@ JPEGXLImport::convert(KisDocument *document, QIODevice *io, KisPropertiesConfigu
break;
}
dbgFile << "\tlayer name:" << QString(layerNameRaw);
- layerName = QString(layerNameRaw);
+
+ // do **not** include the null-termination char into the final layer name
+ layerName = QString::fromUtf8(layerNameRaw.data(), d.m_header.name_length);
} else {
layerName = QString("Layer");
}