Page 1 of 1

Resize, nudge upwards and apply partial gradient

Posted: 2014-10-29T04:08:34-07:00
by Win7
Hi I would like to crop and resize an image, nudge it upward (north) 25 pixels, then apply a black-to-transparent gradient starting 25 pixels from the bottom and fading upward 30 pixels.

Example of final output:

Image

I already have the crop and resize part working, and would like to add on the other steps:

Code: Select all

convert.exe OrigFile -resize 800 -gravity south -crop 800x533+0+0 +repage OutputFile1
Would appreciate your help.

Thank you.

Re: Resize, nudge upwards and apply partial gradient

Posted: 2014-10-29T04:39:07-07:00
by snibgo
... a black-to-transparent gradient starting 25 pixels from the bottom and fading upward 30 pixels.
You could build this in three pieces, then compose that over the input.

Code: Select all

convert -size 800x30 gradient: -gravity South -extent 800x478 -gravity North -background Black -extent 800x533 ( -clone 0 -negate ) -compose CopyOpacity -composite g.png
(There may be a better way.)
nudge it upward (north) 25 pixels
What does that mean? Do you want to trim 25 pixels from the top?

Re: Resize, nudge upwards and apply partial gradient

Posted: 2014-11-09T05:38:39-07:00
by Win7
Hi snibgo, thanks, I will test it out.