Page 1 of 1

How to keep a layer without moving from a shadow layer ?

Posted: 2015-06-12T03:03:43-07:00
by rcspam
Hi,
I need to a text with a shadow image. When i take this:
convert -background none -fill white -pointsize 72 label:'Shadow' -trim \( +clone -background Navy -shadow 80x3+10+10 \) +swap -background none -layers merge shadow1.png
then
convert -background none -fill white -pointsize 72 label:'Shadow' -trim \( +clone -background Navy -shadow 80x5+5+5 \) +swap -background none -layers merge shadow2.png
the text layer of shadow2.png move from text layer shadow1.png.
I want only my shadow layer to move.

Have you a solution for that ?

Re: How to keep a layer without moving from a shadow layer ?

Posted: 2015-06-12T04:17:15-07:00
by snibgo
"-layers merge" makes the result just large enough to contain all the layers. One command creates a shadow to the north of the lettering; the other doesn't.

One solution is to add a third layer to each image, large enough to contain the shadow. This will be the largest layer, so the others will fit into it.

Code: Select all

convert -background none -fill white -pointsize 72 label:'Shadow' -trim ( +clone -alpha transparent -bordercolor None -border 50 -repage -25-25 ) +swap  ( +clone -background Navy -shadow 80x3+10+10 ) +swap -background none -layers merge +repage s1.png

convert -background none -fill white -pointsize 72 label:'Shadow' -trim ( +clone -alpha transparent -bordercolor None -border 50 -repage -25-25 ) +swap  ( +clone -background Navy -shadow 80x5+5+5 ) +swap -background none -layers merge +repage s2.png