
note that ball.jpg in no longer centered in this output.
Code: Select all
convert sky.png ball.jpg -alpha set -set page '-%[fx:w/2]-%[fx:h/2]' \
\( +clone -background black -shadow 80x12+12+12 \) +swap \
-layers merge +repage sky_ball.jpg
Code: Select all
-set page '+%[fx:(u.w-w)/2]+%[fx:(u.h-h)/2]'
motumbo wrote:Perfect, makes sense!
btw not sure if this is the appropriate channel but the -shadow itself introduces some artifacts when the sigma value is high, mostly notable with light backgrounds (high contrast between the shadow and the background)
note that the borders of the shadow are not smooth as they should; seems like the internal blur applied is a little higher then the actual sigma mask.
convert sky.png ball.jpg \
\( -clone 1 -background black -shadow 100x40+10+10 \) \
\( -clone 0 -clone 2 -gravity center -geometry +100+100 -compose over -composite \) \
-delete 0,2 +swap -gravity center +geometry -compose over -composite sky_ball.jpg
Thanks for all the help!
the reason for this is that the amount of added extra space for the blur is set to only 2x the sigma. really it should be three.motumbo wrote:btw not sure if this is the appropriate channel but the -shadow itself introduces some artifacts when the sigma value is high, mostly notable with light backgrounds (high contrast between the shadow and the background)
Code: Select all
\( +clone -alpha set -bordercolor none -border 10 -repage -10-10! \
-shadow .... \)