When you compress a line drawing as a jpg, it goes kind of blurry. Areas of solid colour become areas of slightly variable colour etc. Are there any tools out there that attempt to fix this kind of problem, removing the blurriness and making solid areas solid again so that the image looks better and can be usefully compressed with PNG or GIF?
In theory, just colour-reducing an image does the right thing, but in general, this always doesn't quite work well. I think an algorithm tuned to the specific task of repairing damage done by compressing as a jpg could do better.
Ideally I'd want something free that can be run in bulk from the command line.