我试图将直接彩色模型图像转换为双色调索引图像(每像素1位)并将索引图像另存为BMP。 如上所述在Java Advanced Imaging API Home Page: 编码输出的比特深度是由源图像的确定。 从翻看the source code of BMPImageWriter,其机制是返回值ColorModel#getPixelSize()。 使用的an image from Wikimedi
我的目标是使用Floyd-Steinberg方法在JES/Jython中抖动图像。以下是我迄今为止: def Dither_RGB (Canvas):
for Y in range(getHeight(Canvas)):
for X in range(getWidth(Canvas)):
P = getColor(Canvas,X,Y)
E =