Reputation: 47
cmd1: convert -background none -fill "rgb(254,253,185)" -strokewidth 1 -stroke "rgb(6,3,36)" -font ./ss.ttf -pointsize 48 -kerning -7 label:'hello professor' -trim -gravity center zq1.png -append +repage label.png && convert ./giftemp/par.gif ( +clone ) -dispose previous -delay 0 -page +10+235 label.png -page +10+190 label.png -page +10+170 label.png -delay 200 -page +10+142 label.png -loop 0 ./gif/end.gif
I want to replace "label.png" in cmd1 with miff:- pipe :
cmd2: convert -background none -fill "rgb(254,253,185)" -strokewidth 1 -stroke "rgb(6,3,36)" -font ./ss.ttf -pointsize 48 -kerning -7 label:'hello professor' -trim -gravity center zq1.png -append +repage miff:-| convert ./giftemp/par.gif ( +clone ) -dispose previous -delay 0 -page +10+235 label.png -page +10+190 - -page +10+170 - -delay 200 -page +10+142 - -loop 0 ./gif/end.gif
But it did not work.
Upvotes: 0
Views: 322
Reputation: 5395
IM reads the input pipe "-" only once, but you can work it like this...
Start your second command by reading that pipe with "-" and writing it into a memory register like "mpr:piped". Then delete it from the list and continue your second command using the memory register "mpr:piped" wherever you wanted to read from the pipe.
convert label:'hello' miff:- | convert - \
-write mpr:piped -delete 0--1 \
input1.png mpr:piped input2.png mpr:piped +append output.png
Upvotes: 2