Page 1 of 1

Create gradient and compose with image in one command

Posted: 2018-12-25T22:28:49-07:00
by stefda@gmail.com
I can't figure out if it is possible to create a new image with gradient and compose it with an existing image in one command. Please help.

Command to generate the gradient:

Code: Select all

convert -size 1200x747 gradient: gradient.jpg
Command to compose the gradient with an existing `input.jpg`:

Code: Select all

convert input.jpg gradient.png -compose linear_burn -composite output.jpg
Ideally, I'd like to get output.jpg in "one step", using the convert command, without having to generate and store the gradient.jpg image beforehand.

Re: Create gradient and compose with image in one command

Posted: 2018-12-26T01:29:26-07:00
by stefda@gmail.com
A few more searches and I finally understand the anatomy of the command line! What I'm after above can be achieved with this simple command:

Code: Select all

convert input.jpg -size 1200x747 gradient: -compose linear_burn -composite output.jpg
🤦‍♂️

Re: Create gradient and compose with image in one command

Posted: 2018-12-26T10:37:49-07:00
by fmw42
why linear burn and not just -compose over?