convert and fill

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
embaan

convert and fill

Post by embaan »

Hi,

I don't know if it's a bug but I've the next problem:

I want fill an empty image (28x28 pixels) with i.e. the color red.
In the commandline (Windows) I use the next command:

convert -fill "#FF7F7F" Empty.jpg Filled.tif

I've tried also the next commands:

convert -fill red Empty.jpg Filled.tif
convert -fill rgb(255,127,127) Empty.jpg Filled.tif

but nothing has any effect, the Filled.tif image is still white or empty.

What am I doing wrong?
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Post by magick »

Try this command to change all the pixels in an image to redish:
  • convert Empty.jpg -fill "#FF7F7F" -draw 'color 0,0 reset' Filled.tif
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

When no transparency is present (guranteed with JPEG images) you can also use

Code: Select all

-fill color  -colorise 100%
For many more methods see
IM Examples, Canavs generation (from existing images)
http://www.cit.gu.edu.au/~anthony/graph ... vas/#sized
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
embaan

Convert fill

Post by embaan »

Thanks, it works OK now.
Post Reply