Bug 331890 - .PSD export breaks colours
Summary: .PSD export breaks colours
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 2.8 Beta
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Dmitry Kazakov
URL: https://dl.dropboxusercontent.com/u/3...
Keywords:
: 331920 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-08 20:22 UTC by Sascha
Modified: 2014-03-10 13:29 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
screencap of problem (689.72 KB, image/jpeg)
2014-03-08 20:23 UTC, Sascha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sascha 2014-03-08 20:22:32 UTC
Make a document with a few gradients and scribbles, then save a .kra and .psd copy. The .psd will have strange colours in both Krita and Photoshop

https://dl.dropboxusercontent.com/u/38052625/KritaPSDExportBug.jpg

Reproducible: Always

Steps to Reproduce:
1.Make a document with a few gradients and scribbles, then save a .kra and .psd copy. The .psd will have strange colours in both Krita and Photoshop
2.
3.
Actual Results:  
scribbled on page and used the fx glow brush to get a few gradients, .psd had incorrect colours

Expected Results:  
as described
Comment 1 Sascha 2014-03-08 20:23:42 UTC
Created attachment 85483 [details]
screencap of problem
Comment 2 Eo 2014-03-09 08:22:09 UTC
I've just experienced this one too. Was able to reproduce it on demand. I did not use anything that has historically not been able to translate between the two file formats, just straight colour on canvas with normal layers. https://dl.dropboxusercontent.com/u/89200093/kritacolourbug.png
Comment 3 Paul Geraskin 2014-03-09 16:27:08 UTC
Hi guys. Here is the same bug report:
https://bugs.kde.org/show_bug.cgi?id=331920

"PSD is broken. if i save to PSD then colors are different... Looks like they are inverted. 
Screenshot: http://i.imgur.com/jICXW9l.png
My kra file: https://dl.dropboxusercontent.com/u/26887202/Krita/sectant_01_head.kra
Just save it to PSD and you will get blue head."
Comment 4 Sven Langkamp 2014-03-09 16:30:32 UTC
*** Bug 331920 has been marked as a duplicate of this bug. ***
Comment 5 Dmitry Kazakov 2014-03-10 08:09:28 UTC
The bug is reproducible only if the PSD have 2+ layers.
Comment 6 Dmitry Kazakov 2014-03-10 08:10:05 UTC
2.8 branch is also affected
Comment 7 Dmitry Kazakov 2014-03-10 08:13:25 UTC
Commit a09d09c32f6cbaf67a70c0e51b757a1e9f4b7a95 introduces the problem.
Comment 8 Dmitry Kazakov 2014-03-10 10:02:48 UTC
Git commit 00371fead7bbdfafaae9a0ebf68cad98d761b9e5 by Dmitry Kazakov.
Committed on 10/03/2014 at 10:02.
Pushed by dkazakov into branch 'master'.

Fixed loading of multilayered PSD files (including 16-bit ones)

This patch does two things:

1) Fixes the order of the saved channel planes. The indexes of the
   planes array should be calculated separately, not just use
   displayPosition().

2) Fixes the the bug when loading 16-bit data. KoBgrU16Traits::alpha_pos
   is *not* the offset of the alpha channel :) Now all the offset
   calculations are done by the compiler in the templated code. At least
   for RGB color spaces. We need to do the same for Lab, CMYK and Gray
   spaces.

M  +51   -47   krita/plugins/formats/psd/psd_layer_record.cpp

http://commits.kde.org/calligra/00371fead7bbdfafaae9a0ebf68cad98d761b9e5
Comment 9 Dmitry Kazakov 2014-03-10 13:29:11 UTC
Git commit cd0d0bec2bc806c9d47fedd2331ea471f8f57efe by Dmitry Kazakov.
Committed on 10/03/2014 at 10:02.
Pushed by dkazakov into branch 'calligra/2.8'.

Fixed loading of multilayered PSD files (including 16-bit ones)

This patch does two things:

1) Fixes the order of the saved channel planes. The indexes of the
   planes array should be calculated separately, not just use
   displayPosition().

2) Fixes the the bug when loading 16-bit data. KoBgrU16Traits::alpha_pos
   is *not* the offset of the alpha channel :) Now all the offset
   calculations are done by the compiler in the templated code. At least
   for RGB color spaces. We need to do the same for Lab, CMYK and Gray
   spaces.

M  +51   -47   krita/plugins/formats/psd/psd_layer_record.cpp

http://commits.kde.org/calligra/cd0d0bec2bc806c9d47fedd2331ea471f8f57efe