swalkner
swalkner

Reputation: 17359

Imagemagick: how do I an irregular region of color

When I have an image like the following, is it possible to convert the outer (!) orange to transparency? It's like trim, but I need to remove the outer region of orange color and convert that color to transparent. However, the inner orange must not be touched.

enter image description here

Upvotes: 1

Views: 63

Answers (1)

emcconville
emcconville

Reputation: 24439

You can try flood filling the outer color.

convert Zx5HL.png -fill transparent -fuzz 50% -draw 'color 0,0 floodfill' output.png

output.png

... but that'll introduce clipping artifacts.

Upvotes: 2

Related Questions