Re: What is the GraphicsMagick equivalent of ImageMagick's +opaque?
Bob Friesenhahn <[email protected]> Sat, 19 Jan 2019 12:21:34 -0600 (CST)
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 19 Jan 2019, [email protected] wrote: > Extracting a specific color (red) from an indexed BMP in ImageMagick goes like this: > > $ convert input.bmp +opaque "#FF0000" red.png > > Trying it with GraphicsMagick fails as it appears to not support +opaque, only -opaque. Depending on if it meets your needs, you can use the -channel option: gm convert input.bmp -channel Red red.png It is also possible to use the -operator and -recolor options to deal with image channels. This version assigns a zero value to the Green and Blue channels so you get a red channel which still looks red (rather than a grayscale image): gm convert input.bmp -operator Green Assign 0 -operator Blue Assign 0 red.png Use of the -recolor command is left as an exercise but the documentation provides useful examples. :-) > How does one do the equivalent with GraphicsMagick? Perhaps there is a cheatsheet for migrating from ImageMagick to GraphicsMagick? The GraphicsMagick options documentation (also the manual page) is useful since it is pretty accurate and well maintained. I am not sure of a cheat-sheet. Bob -- Bob Friesenhahn [email protected], http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt