Commit 17490357 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Translate old colorspace id's to new id's on loading

CCBUG:305523

The bug isn't fixed yet, because there's also a problem with the
profile that I haven't tracked down yet.
parent 3301cdd9
......@@ -134,14 +134,28 @@ KisImageWSP KisKraLoader::loadXML(const KoXmlElement& element)
colorspacename = "RGBA";
}
profileProductName = element.attribute(PROFILE);
// A hack for an old colorspacename
if (colorspacename == "Grayscale + Alpha")
if (colorspacename == "Grayscale + Alpha") {
colorspacename = "GRAYA";
profileProductName = QString();
}
if (colorspacename == "RgbAF32") {
colorspacename = "RGBAF32";
colorspacename = "GRAYA";
profileProductName = QString();
}
if (colorspacename == "RgbAF16") {
colorspacename = "RGBAF32";
colorspacename = "GRAYA";
profileProductName = QString();
}
QString colorspaceModel = KoColorSpaceRegistry::instance()->colorSpaceColorModelId(colorspacename).id();
QString colorspaceDepth = KoColorSpaceRegistry::instance()->colorSpaceColorDepthId(colorspacename).id();
if ((profileProductName = element.attribute(PROFILE)).isNull()) {
if (profileProductName.isNull()) {
// no mention of profile so get default profile
cs = KoColorSpaceRegistry::instance()->colorSpace(colorspaceModel, colorspaceDepth, "");
} else {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment