Create gradient with the size of an other image

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
pbaumer2
Posts: 1
Joined: 2013-02-20T10:38:36-07:00
Authentication code: 6789

Create gradient with the size of an other image

Post by pbaumer2 »

Hi,

Please excuse the imagemagick newbie.

I would like to create a gradient image (canvas) which has the size of an exiting image file. How can this be done?

Thanks,

Paul
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Create gradient with the size of an other image

Post by fmw42 »

see http://www.imagemagick.org/Usage/canvas ... _gradients

example for the IM internal image rose:

convert rose: -sparse-color Barycentric '0,0 white 0,%h black' rose_size_gradient.png

Just substitute your image for rose:
Post Reply