I need to find the command line options to convert an image to an indexed gif image.
I can't get any commands to work to index the colors. All of the examples from the tutorials, etc., give an error message. For example the following command lines give errors:
c:\convert c:\myfile.png -dither -colors 256 c:\myfile.gif
c:\convert -dither -colors 256 c:\myfile.png c:\myfile.gif
Any help would be greatly appreciated.
Thanks
command line convert with indexed colors
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: command line convert with indexed colors
Your command gives the error:
If you copied this invalid command from a web page, you might give its URL so it can be corrected.
This is because "-dither" needs a method. Type "convert -list dither" to see what methods you can use.convert: unrecognized dither method `-colors' @ error/convert.c/ConvertImageCommand/1252.
If you copied this invalid command from a web page, you might give its URL so it can be corrected.
snibgo's IM pages: im.snibgo.com
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: command line convert with indexed colors
To use a specific set of colors you would use -map image_with_indexed_colors.gif
See IM examples, Color Quantization and Dithering for more help
http://www.imagemagick.org/Usage/quantize/#map
See IM examples, Color Quantization and Dithering for more help
http://www.imagemagick.org/Usage/quantize/#map
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/