Page 1 of 1

How to create an image and blend it in the same command?

Posted: 2013-03-05T05:52:27-07:00
by zettez
Greetings.

I want to create an image with another image as overlay but with transparency and blend like in photoshops multiply feature. I have read http://www.imagemagick.org/pipermail/ma ... 22606.html which states you may pipe the request or use composite in convert. I however cannot get it to work.

My two commands I use:

[*]convert shirt.png -fill green +opaque green colored_shirt.png
[*]composite -blend 80 shirt.png colored_shirt.png fixed_shirt.png

Is it possible to get the result fixed_shirt.png in one command? Do you suggest another approach? It would be nice if I could skip to create colored_shirt.png.

Re: How to create an image and blend it in the same command?

Posted: 2013-03-05T10:30:22-07:00
by fmw42
use the convert version of -compose blend and parenthesis processing.

see
http://www.imagemagick.org/Usage/compose/#blend
http://www.imagemagick.org/Usage/basics/#parenthesis

something like

convert shirt.png \( -clone 0 -fill green +opaque green \) -define compose:args=80 -compose blend fixed_shirt.png

I believe this is 20% shirt and 80% processed shirt, but it may be the other way around.

If on Windows, leave off the two \ escapes

Re: How to create an image and blend it in the same command?

Posted: 2013-03-07T06:30:56-07:00
by zettez
Thank you, I had totally missed the parenthesis.