Need help understanding the ImageMagick/Graphicsmagick -colors option
问题 I am trying to programmatically reduce (lossy) the file size of PNG and GIF files. As part of this I need to reduce the number of colors in the images. I don't want to reduce all the images to a single colors value, so what I am doing is; get the number of unique colors in the image, then; divide this number by 2 to reduce the number of colors by half. The problem is this does not work. Using ImageMagic it is way too slow and doesn't reduce the file size unless the image has under a few