Commit 3434ec61 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix loading PSD files by PS after being edited by Krita

Some resources of PS contain the list of all the layers in the image.
Therefore, if we edit the layers structure, the list might become invalid
and PS will refuse to load that

BUG:355110
parent db2e1a3f
......@@ -268,6 +268,21 @@ bool PSDResourceBlock::write(QIODevice* io)
return false;
}
if (identifier == PSDImageResourceSection::LAYER_STATE ||
identifier == PSDImageResourceSection::LAYER_GROUP ||
identifier == PSDImageResourceSection::LAYER_COMPS ||
identifier == PSDImageResourceSection::LAYER_GROUP_ENABLED_ID ||
identifier == PSDImageResourceSection::LAYER_SELECTION_ID) {
/**
* We can actually handle LAYER_SELECTION_ID. It consists
* of a number of layers and a list of IDs to select, which
* are retrieved from 'lyid' additional layer block.
*/
dbgFile << "Skip writing resource block" << identifier << displayText();
return true;
}
QByteArray ba;
// createBlock returns true by default but does not change the data.
......
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