Page 1 of 1

possible bug saving psd files with more than 1 layer

Posted: 2013-12-21T14:05:55-07:00
by fmw42
IM 6.8.7.10 Q16 Mac OSX.

It seems that converting psd files with more than one layer is not handling the additional layers correctly.

The following is a test that I made including a resize (from viewtopic.php?f=3&t=24676), but I get the same kind of results just converting from PSD to PNG or JPG.

I did 3 tests with PS CS. I added different kinds of layers. Then resized to png format. In each case, the additional layers were not converted correctly.


Starting with one layer, test.psd

http://www.fmwconcepts.com/misc_tests/psd_bug/test.psd

1) I just resized it to png and all was fine

convert test.psd -resize 75% test.png

Image


2) I added a second fully transparent layer to test.psd and resized it in IM. I got two layers, but the second layer was not a copy of the second (transparent) layer in the psd file, but an offset copy of the first and partly cyan

http://www.fmwconcepts.com/misc_tests/psd_bug/test2.psd

convert test2.psd -resize 75% test.png

Image

Image


3) I added a second layer to test.psd that was a copy of the first layer and resized it in IM. This time I got 3 png images (rather than the expected 2), where the second layer was not a copy of the second psd layer, but an offset copy and partly cyan and the third layer was black.

http://www.fmwconcepts.com/misc_tests/psd_bug/test3.psd

convert test3.psd -resize 75% test.png

Image

Image

Image


I get the very same erroneous results saving to JPG and in both (JPG and PNG) cases the same erroneous results if I leave off the -resize.

Re: possible bug saving psd files with more than 1 layer

Posted: 2013-12-21T14:52:04-07:00
by denpa
Another thing I've noticed is that saving psd files without the "maximize compatibility" option results in IM not being able to read them at all - but that might be by design, considering the support isn't official. Just wanted to add that.

Again, thanks for taking a look at the issue.

Re: possible bug saving psd files with more than 1 layer

Posted: 2013-12-21T15:40:38-07:00
by fmw42
denpa wrote:Another thing I've noticed is that saving psd files without the "maximize compatibility" option results in IM not being able to read them at all - but that might be by design, considering the support isn't official. Just wanted to add that.
I do not think IM has ever been able to read PSD without it having been saved with "maximize compatibility". PSD is a very complicated format with lots of features that are most hard to keep up with or handle fully. IM cannot handle special layers such as effects and things of that nature nor grouped layers. It cannot handle both background transparency and alpha transparency at the same time. It only handles one and I do not recall which one it is.

Re: possible bug saving psd files with more than 1 layer

Posted: 2013-12-21T15:50:25-07:00
by fmw42
My test.psd, test2.psd and test3.psd all have every layer with compression=none. So it is not the zip compression issue as far as I can tell. I am pretty sure that IM used to be able to handle simple layers properly when converting to other formats.

Re: possible bug saving psd files with more than 1 layer

Posted: 2013-12-21T16:20:09-07:00
by fmw42
I tested a number of IM versions back as far as 6.7.9.0 and they all fail to generate proper images for any layer but the first. So I was wrong about this working before. Even converting only the second layer fails.

So apparently, this has been a long standing bug.