Search code examples
imageimage-processinggraphicsmagick

How I can remove background color from image using GraphicsMagick?


How I can remove background color from image using GraphicsMagick? I need to delete rgb(255,255,255) and rgb(254,254,254) colors from image and replace them to transparency.

Thank you.


Solution

  • you should tinker with fuzz -parameter to match #fefefe

    gm convert in.png -fuzz 3% -transparent "#ffffff" out.png