Page 2 of 2

Re: Watermarking Transparent PSD Image

Posted: 2016-12-08T16:32:06-07:00
by fmw42
try this (unix syntax):

# line 1 - get dimensions of input psd
# line 2 - convert psd to sRGB
# line 3 - create same size gray image
# line 4 and 5 - extract alpha channel from watermark image and tile out the same size as psd
# line 6 overlay the gray image onto the base PSD (without alpha channel) using the watermark alpha channel
# line 7 add the alpha from the PSD with the tiled alpha from the watermark
# line 8 delete temps and put the combined alpha channel into the PSD replacing its old alpha with the combined one

Code: Select all

dim=`convert W_MYAG_F7956_14021_001X.psd[0] -format "%wx%h" info:`
convert \( W_MYAG_F7956_14021_001X.psd[0] -colorspace sRGB \) \
\( -clone 0 -fill "gray(50%)" -colorize 100 \) \
\( LimitedUsePSD.png -alpha extract -auto-level \
-write mpr:tile +delete -size $dim tile:mpr:tile \) \
\( -clone 0 -clone 1 -clone 2 -alpha off -compose over -composite \) \
\( -clone 0 -alpha extract -clone 2 -compose over -compose plus -composite \) \
-delete 0-2 -alpha off -compose over -compose copy_opacity -composite result.png

Re: Watermarking Transparent PSD Image

Posted: 2016-12-12T11:58:54-07:00
by pssvarma8881
Hi ,

This is working for some of the images,Thanks for you help .

Since We have got complex PSD with multiple Layers the above command not working for all images .

Is there a way to remove the Transparent background and Replace with With White background then we do watermark ?

Thanks in advance

Re: Watermarking Transparent PSD Image

Posted: 2016-12-12T12:02:45-07:00
by fmw42
Did you try

Code: Select all

dim=`convert W_MYAG_F7956_14021_001X.psd[0] -format "%wx%h" info:`
convert \( W_MYAG_F7956_14021_001X.psd[0] -colorspace sRGB \) \
\( -clone 0 -fill "gray(50%)" -colorize 100 \) \
\( LimitedUsePSD.png -alpha extract -auto-level \
-write mpr:tile +delete -size $dim tile:mpr:tile \) \
\( -clone 0 -clone 1 -clone 2 -alpha off -compose over -composite \) \
\( -clone 0 -alpha extract -clone 2 -compose over -compose plus -composite \) \
-delete 0-2 -alpha off -compose over -compose copy_opacity -composite \
-background white -compose over -flatten result.png
or simpler

Code: Select all

dim=`convert W_MYAG_F7956_14021_001X.psd[0] -format "%wx%h" info:`
convert \( W_MYAG_F7956_14021_001X.psd[0] -colorspace sRGB -background white -flatten \) \
\( -clone 0 -fill "gray(50%)" -colorize 100 \) \
\( LimitedUsePSD.png -alpha extract -auto-level \
-write mpr:tile +delete -size $dim tile:mpr:tile \) \
-alpha off -compose over -composite \
result.png 

But what does this have to do with multilayer PSD

Re: Watermarking Transparent PSD Image

Posted: 2016-12-12T13:55:15-07:00
by pssvarma8881
Hi

Just tried these commands and there are working with all the PSD .there are some PSDs for which watermarking is coming up but original Image was missing from the PSD .

Thanks for your help.

Re: Watermarking Transparent PSD Image

Posted: 2016-12-12T16:53:25-07:00
by pssvarma8881
Hi Let me know if you have any suggestion on this .

Re: Watermarking Transparent PSD Image

Posted: 2016-12-12T17:03:32-07:00
by fmw42
Suggestions for what? What is the problem? Post and image and tell me what is not working.

Re: Watermarking Transparent PSD Image

Posted: 2016-12-12T17:15:22-07:00
by pssvarma8881

Re: Watermarking Transparent PSD Image

Posted: 2016-12-12T17:32:10-07:00
by fmw42
Please provide your input image separately and your exact IM command line.