Page 1 of 1

EXR to JPG with vertical background gradient

Posted: 2019-07-05T06:14:24-07:00
by keljnr
I have a script which adds a background gradient to exr then converts to a jpg (changing colorspace along the way). Only issues is that I'm wanting a vertical linear gradient.
The following code gives me a diagonal gradient.

How can I change this to show as a vertical gradient?

Code: Select all

cd %~dpnx1
for %%a in (.) do set currentfolder=%%~na
start cmd /c magick *exr* null: ( -clone 0--2 -sparse-color bilinear 0,0,'#34465d',%%[fx:w-1],%%[fx:h-1],black ) -colorspace RGB -colorspace sRGB -compose DstOver -layers Composite "%currentfolder%.pdf"
Many thanks.

Re: EXR to JPG with vertical background gradient

Posted: 2019-07-05T06:25:38-07:00
by snibgo

Re: EXR to JPG with vertical background gradient

Posted: 2019-07-05T09:15:36-07:00
by fmw42
change %%[fx:w-1] to 0 and change bilinear to barycentric. See https://imagemagick.org/Usage/canvas/#t ... _gradients