Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Office
Calligra
Commits
a09d09c3
Commit
a09d09c3
authored
Mar 03, 2014
by
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
7d16117d
Changes
1
Hide whitespace changes
Inline
Side-by-side
krita/plugins/formats/psd/psd_layer_record.cpp
View file @
a09d09c3
...
...
@@ -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
{
planes
.
append
(
tmp
[
ch
->
pos
()]);
planes
.
append
(
tmp
[
ch
->
displayPosition
()]);
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment