GNOME Bugzilla – Bug 556741
Alpha layer automatically added (in psd format) but not desired.
Last modified: 2008-10-22 06:50:18 UTC
Please describe the problem: The problem, as i described in title, is simple. When you open a native .psd image, you do anything in this image and then save it. The result is the creation of a non-desired alpha layer named Transparency. It causes an important problem when you want to use an exporter which manipulates alpha layers. Steps to reproduce: 1. Open a native .psd image 2. Change it (as you want) 3. Save it 4. Close it 5. Open it again 6. Notice the apparition of the non-desired alpha layer Actual results: A non-desired alpha layer appears Expected results: Avoid to create this alpha layer Does this happen every time? Always Other information: This bug wasn't in the 2.4 version, it appears with the 2.6 (or maybe the 2.5 which i didn't use)
This was added as a feature, see bug #551231. What problems does it create?
At my work, we develop on a support which understand alpha layers like containers of reference points. I think, simply, you have to not create this alpha layer (Transparency) when the .psd already contains one (or several). I join an example of .psd we use.
Created attachment 120908 [details] An example of .psd using alpha layers as reference points
Dennis, could you please have a look at this bug report? Thanks.
Yes, I can reproduce this with the example .psd. As far as I can see, this only affects indexed PSDs. Can you confirm that? Saving transparency information for indexed psds is clearly an error. I'll try to create a fix for this later today.
We only manipulate indexed PSDs. So I can confirm it happens on all indexed PSDs but i'm not shure it's the only concerned format.(But as far as I'm concerned if you fix this we won't have any problem : selfish ^^). If you fix this today, when can we hope to see a new version containing the fix ? (I really apreciate the new version 2.6, but due to this bug I have to use the 2.4 :) )
Created attachment 121011 [details] [review] Make sure that no transparency information is written for indexed PSD files Ok, this patch fixes this bug by flattening the merged image if it is indexed and has alpha. (The patch is against the 2.6 branch, but it should apply just as well to trunk.) This should be done in any case, but it looks to me as if gimp_layer_new_from_visible always creates a layer with alpha for indexed images, regardless of whether the source image has alpha. I'm not sure whether that is intentional. @MENET Rodrigue: I have no idea when the next minor version of GIMP will be released.
gimp_layer_new_from_visible() always creates a layer with alpha, no matter what mode the image has. The projection always has an alpha channel.
Thanks for the patch. Applied to both branches: 2008-10-22 Sven Neumann <sven@gimp.org> Bug 556741 – Alpha layer automatically added (in psd format) but not desired * plug-ins/file-psd/psd-save.c: applied patch from Dennis Ranke that flattens the projection for indexed images.