Bug 333300 - PSD: Alpha channel disappears after FlatternImage
Summary: PSD: Alpha channel disappears after FlatternImage
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-10 21:03 UTC by Paul Geraskin
Modified: 2015-08-13 17:26 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Geraskin 2014-04-10 21:03:19 UTC
Hi devs.

Alpha channel disappears after FlatternImage of my PSD file.

Here is my video test: http://youtu.be/ziITf4LsbIg
Here is the file: https://dl.dropboxusercontent.com/u/26887202/blender/leaf_01.zip

Reproduce:
- Open leaf_01.psd
- Flattern Image, save, close.
- Open the psd again - ALPHA WILL BE DISAPPEARED.
Comment 1 Paul Geraskin 2014-04-11 08:02:23 UTC
Also tested with one layer. KRA is ok. PSD is buggy.

http://i.imgur.com/3FkxkDS.png
Comment 2 Paul Geraskin 2014-04-11 08:30:12 UTC
Also some issues i got with blender. PSD alpha. 
I reported here https://developer.blender.org/T39652
Comment 3 Halla Rempt 2014-08-23 09:54:09 UTC
When I tried to flatten the image in photoshop, the alpha channel also disappeared, and the transparent pixels were filled with white.
Comment 4 Halla Rempt 2014-08-23 09:58:09 UTC
Git commit 63ccd2f2ec09778e4f11bdef5c6323bef22377ff by Boudewijn Rempt.
Committed on 23/08/2014 at 09:56.
Pushed by rempt into branch 'master'.

PSD: fix saving the composed image

The composed image data in Photoshop should be pre-filled with white.
Related: bug 333322

M  +15   -1    krita/plugins/formats/psd/psd_image_data.cpp
M  +1    -1    krita/plugins/formats/psd/psd_image_data.h

http://commits.kde.org/calligra/63ccd2f2ec09778e4f11bdef5c6323bef22377ff
Comment 5 Paul Geraskin 2014-08-23 19:41:26 UTC
Transparent pixels should be pre-filled with Background color. Not white.
In PS - default transparent background is white.

I'll update my Krita at monday and test your changes.
Comment 6 Paul Geraskin 2014-08-26 13:17:39 UTC
Hello Boud.

Sorry but you broke PSD.

Issues:
-Now PSD has no Alpha at all in other apps. But the PSD opens in Krita ok.
- Now PSD fills image with White color. But it should fill the image with Background color.

Here is the test:
http://i.imgur.com/QwwIX7c.png

Here is the test file. Just save to PSD and open PSD in any PSD-viewer:
https://dl.dropboxusercontent.com/u/26887202/Krita/test_psd.kra

I reopen the issue.
Comment 7 Paul Geraskin 2014-08-26 13:24:09 UTC
As Dalai Felinto wrote in this bug: https://bugs.kde.org/show_bug.cgi?id=333322

Possibly you should take into account the background color.
Like this test shows: http://youtu.be/_Wwj6Fl8wXE
Comment 8 Halla Rempt 2014-09-26 08:54:02 UTC
Git commit 8f4f989086576c2ab30de20b128764b366ffd2ff by Boudewijn Rempt.
Committed on 23/08/2014 at 09:56.
Pushed by rempt into branch 'calligra/2.8'.

PSD: fix saving the composed image

The composed image data in Photoshop should be pre-filled with white.
Related: bug 333322

M  +15   -1    krita/plugins/formats/psd/psd_image_data.cpp
M  +1    -1    krita/plugins/formats/psd/psd_image_data.h

http://commits.kde.org/calligra/8f4f989086576c2ab30de20b128764b366ffd2ff
Comment 9 Paul Geraskin 2014-09-26 09:18:57 UTC
Hello.
I updated Master branch. Still not fixed http://i.imgur.com/SlwiNx6.png
Comment 10 Paul Geraskin 2014-09-26 09:19:39 UTC
I reopen the bug for a while. Ok?
Comment 11 guruguru.sp 2015-06-21 11:08:14 UTC
Confirmed for me in 2.9.5.2 Windows and Photoshop elements 12. The alpha is lost(black is used instead)
Comment 12 guruguru.sp 2015-06-21 11:17:21 UTC
Well, I think the issue is not caused by flatten image. The following steps just give me black output. (and you don't need Photoshop to confirm, just read it back to Krita to test) 
I guess Krita is exporting the layer as "background" with no alpha information when there is only one layer in the document...?
1. Create one transparent layer document in Krita
2. Save it as PSD
3. Reopen the file created in 2. in Krita -> you see "black" layer not transparent one.
Comment 13 Dmitry Kazakov 2015-06-25 13:17:56 UTC
Switch to CONFIRMED then