Posted By


deepsoul on 11/01/09

Tagged


Statistics


Viewed 60 times
Favorited by 0 user(s)

Replace background colour


/ Published in: Bash
Save to your folder(s)

When you put an image in a printable document, you don't want it to have black (or coloured) background. ImageMagick allows to replace colours even when the coloured regions are non-contiguous. Arbitrary colour values can be specified with `\#123456` (the backslash is for escaping the #). If you want to replace similar colours as well, use the `-fuzz` option.


Copy this code and paste it in your HTML
  1. convert blackbackground.png -fill white -opaque black whitebackground.png
  2. convert bluebackground.png -fill white -opaque \#200070 whitebackground.png

URL: http://www.imagemagick.org/Usage/color/#replace

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.