我能够与BufferedImage
以获得一个640x640的图像的每个像素的RGB值,输出看起来是这样的:转换24位图像RGB到3位8色
[...]
Pixel :(640, 634) RGB: 166 94 82
Pixel :(640, 635) RGB: 166 94 80
Pixel :(640, 636) RGB: 163 91 77
Pixel :(640, 637) RGB: 157 88 73
Pixel :(640, 638) RGB: 157 88 73
Pixel :(640, 639) RGB: 159 90 74
Pixel :(640, 640) RGB: 158 89 73
This image has 69197 colors.
我需要将这种方式获得的每种RGB颜色分类为3位RGB(8种颜色),我需要对如何做到这一点有一个想法...如何知道RGB的8个颜色中的每一个的范围3位RGB。谢谢!
该操作称为[抖动](http://en.wikipedia.org/wiki/Dither#Digital_photography_and_image_processing)。 – 2012-07-18 18:41:36