Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Fred Fonkle
Krita
Commits
9d648d2f
Commit
9d648d2f
authored
Dec 05, 2012
by
Halla Rempt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix warning
parent
6d360054
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
krita/plugins/formats/psd/psd_layer_record.cpp
krita/plugins/formats/psd/psd_layer_record.cpp
+2
-2
No files found.
krita/plugins/formats/psd/psd_layer_record.cpp
View file @
9d648d2f
...
...
@@ -656,7 +656,7 @@ bool PSDLayerRecord::writePixelData(QIODevice *io)
// if the bitdepth > 8, place the bytes in the right order
// if cmyk, invert the pixel value
if
(
m_header
.
channelDepth
==
8
)
{
if
(
channelInfoRecords
[
channelInfoIndex
]
->
channelId
>=
0
&&
m_header
.
colormode
==
CMYK
||
m_header
.
colormode
==
CMYK64
)
{
if
(
channelInfoRecords
[
channelInfoIndex
]
->
channelId
>=
0
&&
(
m_header
.
colormode
==
CMYK
||
m_header
.
colormode
==
CMYK64
)
)
{
for
(
int
i
=
0
;
i
<
rc
.
width
()
*
rc
.
height
();
++
i
)
{
planes
[
channelInfoIndex
][
i
]
=
255
-
planes
[
channelInfoIndex
][
i
];
}
...
...
@@ -667,7 +667,7 @@ bool PSDLayerRecord::writePixelData(QIODevice *io)
for
(
int
i
=
0
;
i
<
rc
.
width
()
*
rc
.
height
();
++
i
)
{
val
=
reinterpret_cast
<
quint16
*>
(
planes
[
channelInfoIndex
])[
i
];
val
=
ntohs
(
val
);
if
(
m_header
.
colormode
==
CMYK
||
m_header
.
colormode
==
CMYK64
)
{
if
(
channelInfoRecords
[
channelInfoIndex
]
->
channelId
>=
0
&&
(
m_header
.
colormode
==
CMYK
||
m_header
.
colormode
==
CMYK64
)
)
{
val
=
quint16_MAX
-
val
;
}
reinterpret_cast
<
quint16
*>
(
planes
[
channelInfoIndex
])[
i
]
=
val
;
...
...
Write
Preview
Markdown
is supported
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