Page 1 of 1

DstOver w transparent tif issue in PS

Posted: 2015-06-11T20:40:43-07:00
by sorno
Hi all.
I have two tif files that i am compositing using DstOver.
One has transparency and one does not.

This appears to work perfectly when I preview and print the images just using the preview tool in windows.

composite -compose Dst_Over -gravity center "src_image.tif" "dst_image_trans.tif" -colorspace RGB "new_output.tif"

However when I open in PS, only dst_image_trans.tif can be seen. The src_image that was to be under it is gone.
There is only one layer showing, layer1, with the dst_image, and the transparency is there.
I have tried additional convert commands for -flatten and -layers flatten, but neither change the file.

Any ideas?
Files here https://www.dropbox.com/s/tsv02lf646c0h ... g.zip?dl=0
Using windows, im version 6.9.1-4

Re: DstOver w transparent tif issue in PS

Posted: 2015-06-11T21:35:22-07:00
by fmw42
It appears that there is some meta data that is causing this. It works for me if I strip both images of meta data and use the more current IM syntax on IM 6.9.1.4 Q16 Mac OSX and (a very old) PS CS. The result when opened in PS is one layer with a transparent alpha channel.

Code: Select all

convert dst_image_trans.tif src_image.tif -strip -gravity center -compose dst_over -composite out.tif
Note the swapping of the image order between your command and mine. See http://www.imagemagick.org/Usage/compose/#compose

I am puzzled why you want to change the colorspace to linear RGB rather than the default sRGB. You might be better assigning a profile after the end since the meta data has been stripped.

You can try removing each profile in the original images one at a time to see which one is the offending one.

Re: DstOver w transparent tif issue in PS

Posted: 2015-06-11T21:43:02-07:00
by sorno
Hi guys figured this out.
I created an alpha channel for the transparent area and saved the file in PS with no layers, but with alpha channel, and then set the composite to -alpha set. Works!
like this
composite -alpha set -compose Dst_Over -gravity center "src_image.tif" "dst_image_trans.tif" -colorspace RGB "new_output.tif"