how to combine pipes into one? thanks

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
kissson
Posts: 14
Joined: 2012-05-15T02:15:32-07:00
Authentication code: 13

how to combine pipes into one? thanks

Post by kissson »

my command on windows command prompt, I am looking for a way to increase performance
convert input.png -resize 854x480^> - | ^
composite -watermark 30%% watermark.png - - | ^
convert - -background gray90 -gravity center -extent 854x480 out.png

can convert use the composite method ?
thanks
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: how to combine pipes into one? thanks

Post by anthony »

That should work fine.... under UNIX (with the correct command meta-char conversions)

Though the inout '-' for composite needs two images!

I am not certain under DOS.


actually you can do it all in one command without a pipeline! Con vert can do image composition.
'watermark' is known as 'modulate'.

http://www.imagemagick.org/Usage/compose/#watermark
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
kissson
Posts: 14
Joined: 2012-05-15T02:15:32-07:00
Authentication code: 13

Re: how to combine pipes into one? thanks

Post by kissson »

I can't get
-compose modulate -define compose:args=50 -composite
working, unwanted outcome produced

now I found it how to make it in single command,
convert -size 800x600 xc:red input.png
convert -size 100x100 xc:yellow watermark.png
convert input.png -resize 854x480^> ^
( watermark.png -alpha set -channel A -evaluate multiply 0.33 +channel ) ^
-composite ^
-background gray90 -gravity center -extent 854x480 ^
out.png

thx http://studio.imagemagick.org/discourse ... 74&p=66759
Post Reply