I don't understand what is the problem.
Every application will have a different way to merge even using simpler file.
xxx.psd is my simple test file above.
Code: Select all
$ identify -verbose xxx.psd[0] | egrep -i '(red|green|blue|alpha):[^$]'
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 8-bit
Alpha: srgba(255,255,255,0) #FFFFFF00
$ identify -verbose xxx.psd[1] | egrep -i '(red|green|blue|alpha):[^$]'
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 8-bit
Alpha: none #00000000
$ identify -verbose xxx.psd[2] | egrep -i '(red|green|blue|alpha):[^$]'
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 16-bit
Alpha: none #00000000
xxx.tif is converted with Gimp
Code: Select all
$ identify -verbose xxx.tif | egrep -i '(red|green|blue|alpha):[^$]'
red: 16-bit
green: 16-bit
blue: 16-bit
alpha: 8-bit
Alpha: none #00000000
tiff:alpha: associated
xxx2.tif is merged with IM.
Code: Select all
$ convert xxx.psd[1] xxx.psd[2] -crop 320x200+0+0 -background none -layers merge -compress LZW xxx2.tif
$ identify -verbose xxx2.tif | egrep -i '(red|green|blue|alpha):[^$]'
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 8-bit
Alpha: srgba(255,255,255,0) #FFFFFF00
tiff:alpha: unassociated
xxx3.tif is simple convert with IM:
Code: Select all
$ convert xxx.psd[0] xxx3.tif
$ identify -verbose xxx3.tif | egrep -i '(red|green|blue|alpha):[^$]'
red: 8-bit
green: 8-bit
blue: 8-bit
alpha: 8-bit
Alpha: srgba(255,255,255,0) #FFFFFF00
tiff:alpha: unassociated
xxx4.tif is merged by photoshop (save without layer).
Code: Select all
$ identify -verbose xxx4.tif | egrep -i '(red|green|blue|alpha):[^$]'
red: 16-bit
green: 16-bit
blue: 16-bit
alpha: 8-bit
Alpha: none #00000000
tiff:alpha: associated
result
Code: Select all
$ compare -metric PSNR xxx.psd[0] xxx.tif null:
37.2018
$ compare -metric PSNR xxx.psd[0] xxx2.tif null:
30.118
$ compare -metric PSNR xxx.psd[0] xxx3.tif null:
inf
$ compare -metric PSNR xxx.psd[0] xxx4.tif null:
37.215
As far as I see here, ImageMagick will not change image during psd to tiff conversion. See xxx3.tif.
fmw42 wrote:What is puzzling is that the first layer of the PSD does not seem to be a completely flattened layer
I think first layer [0] of your psd is somewhat broken - i.e. in PSD format, merged layer is saved in different place from other layers [1], [2] etc. So it is possible to create a PSD file whose merged layer is totally irrelevant. (That's why Dirk said it might be "old Photoshop bug" that might occurred in saving.)
For example,
Code: Select all
$ convert \( -label "top" rose: -resize 32x32! \) \( -label "bottom" logo: -resize 32x32! \) \( -clone 1 -negate -mosaic \) -reverse result.psd
$ identify result.psd
result.psd[0] PSD 32x32 32x32+0+0 8-bit sRGB 9.44KB 0.000u 0:00.033
result.psd[1] PSD 32x32 32x32+0+0 8-bit sRGB 9.44KB 0.016u 0:00.007
result.psd[2] PSD 32x32 32x32+0+0 8-bit sRGB 9.44KB 0.016u 0:00.008
If you open result.psd in Photoshop or Gimp, you only see rose (and logo on layer view), but what is the result with