【发布时间】:2015-12-18 21:59:32
【问题描述】:
我在单色显示器上绘制联系人图片,但结果很差,显然只应用了阈值抖动(请参阅此处的比较:dithering algorithms)。我怎样才能获得 有序 或其他(更好的)抖动结果?
这是我使用的代码:
// RGB_565 is most suitable for monochrome display
Bitmap b = Bitmap.createBitmap(desW, desH, Bitmap.Config.RGB_565);
// Set the density to default to avoid scaling.
b.setDensity(DisplayMetrics.DENSITY_DEFAULT);
Canvas c = new Canvas(b);
c.drawBitmap(photo, source, destination, new Paint(Paint.FILTER_BITMAP_FLAG | Paint.DITHER_FLAG));
我尝试设置不同的位图配置,但没有任何改变。
【问题讨论】:
标签: android