Page 1 of 1

mpr

Posted: 2015-12-19T13:27:46-07:00
by excel
Why not work with mpr ?


Working

convert delimeter.png -write mpr:delimeter +delete -respect-parentheses \
\( background.png mpr:delimeter -compose Dst_Out -gravity south -alpha Set -composite +write section.png \) \
\( convert section.png -alpha set \
\( +clone -background '#000000' -shadow 100x0+0+5 \) \
+swap -background none -mosaic +write result.png \)



Not working

convert delimeter.png -write mpr:delimeter +delete -respect-parentheses \
\( background.png mpr:delimeter -compose Dst_Out -gravity south -alpha Set -composite +write mpr:section \) \
\( convert mpr:section -alpha set \
\( +clone -background '#000000' -shadow 100x0+0+5 \) \
+swap -background none -mosaic +write result.png \)



Problem with mpr:section.
Help Please.

Re: mpr

Posted: 2015-12-19T14:03:50-07:00
by GeeMack
Looks like you're trying to access the "mpr:section" from a new "convert" command. I'm not on a *nix to test it now, but maybe try a "-delete 0--1" after the first "mpr:section" and get rid of the second "convert" command. It might squawk at the end because there's no file name being written, so you might have to put /dev/null after the whole thing (or move your last "result.png" outside the parenthesis and get rid of the last "-write"). Something like that.

Re: mpr

Posted: 2015-12-19T14:20:24-07:00
by fmw42
You do not need mpr at all and if you did want to use it, you cannot have a second convert in your parentheses or anywhere else in the command line. Try

Code: Select all

convert background.png delimeter.png -gravity south -compose Dst_Out -composite \
\( +clone -background '#000000' -shadow 100x0+0+5 \) \
+swap -background none -layers merge +repage result.png
see http://www.imagemagick.org/Usage/blur/#shadow

Re: mpr

Posted: 2015-12-19T15:11:20-07:00
by excel
Images:

1. background.png (without opacity)
Image


2. delimeter.png (with opacity)
Image


Need such result.png (with opacity)
Image

Re: mpr

Posted: 2015-12-19T18:25:06-07:00
by fmw42
try this

Code: Select all

convert background.png delimeter.png -compose Dst_Out -gravity south -composite -alpha on \
\( -clone 0 -background '#000000' -shadow 100x0+0+5 \) \
+swap -background none -compose over -layers merge +repage result.png
You have to reset the compose method to over before the -layers merge; otherwise -layers merge tries to use Dst_Out.

Re: mpr

Posted: 2015-12-19T18:43:41-07:00
by excel
fmw42 wrote:try this

Code: Select all

convert background.png delimeter.png -compose Dst_Out -gravity south -composite -alpha on \
\( -clone 0 -background '#000000' -shadow 100x0+0+5 \) \
+swap -background none -compose over -layers merge +repage result.png
You have to reset the compose method to over before the -layers merge; otherwise -layers merge tries to use Dst_Out.

Thanks! It works!