Commit 04700d2c authored by Halla Rempt's avatar Halla Rempt
Browse files

BUG:331702 Don't crash when saving 16 bits/channel PSD

We need to order channels by display position, not byte position...
parent 0274f177
......@@ -637,11 +637,12 @@ bool PSDLayerRecord::writePixelData(QIODevice *io)
// then reorder the planes to fit the psd model -- alpha first, then display order
QVector<quint8* > planes;
foreach(KoChannelInfo *ch, KoChannelInfo::displayOrderSorted(dev->colorSpace()->channels())) {
qDebug() << ">>>\t" << ch->name() << ch->displayPosition() << ch->channelType();
if (ch->channelType() == KoChannelInfo::ALPHA) {
planes.insert(0, tmp[ch->pos()]);
planes.insert(0, tmp[ch->displayPosition()]);
else {
Supports Markdown
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