Two colors images compression algorithm
What is the best开发者_如何学运维 (minimize size) compression algorthm for images with only two colors? And the fastest?
It depends on what the image looks like. If it's mostly large blotches of color then you may do well with Run Length Encoding. If it's constantly changing colors, you might make a matrix of bits corresponding to the pixels and then compress that with LZW.
The method used by PNG would be pretty good, it combines prediction and compression.
DjVu is know to compress certain 2-color bitmaps, like text, pretty well.
Jbig2 would be one of the best compressions and it is supported by Adobereader
精彩评论