Android 如何使用antialias有效地调整图像大小?

Android 如何使用antialias有效地调整图像大小?,android,android-canvas,android-graphics,android-paint,Android,Android Canvas,Android Graphics,Android Paint,我尝试调整图像大小,如下所示: aPaint.setAntiAlias(true); // Enabling this flag will cause all draw operations that support antialiasing to use it. aPaint.setFilterBitmap(True); // enable bilinear sampling on scaled bitmaps. If cleared, scaled bitmaps will be drawn

我尝试调整图像大小,如下所示:

aPaint.setAntiAlias(true); // Enabling this flag will cause all draw operations that support antialiasing to use it.
aPaint.setFilterBitmap(True); // enable bilinear sampling on scaled bitmaps. If cleared, scaled bitmaps will be drawn with nearest neighbor sampling, likely resulting in artifacts.
apaint.setDither(true); // Enabling this flag applies a dither to any blit operation where the target's colour space is more constrained than the source.
aCanvas.drawBitmap(aBitmap, aJSrcRect, aJDestRectf, apaint);
Paint paint= new Paint();
paint.setFlags(Paint.ANTI_ALIAS_FLAG);
paint.setAntiAlias(true);
paint.setFilterBitmap(true); 
但是我没有一个很好的抗锯齿图像(它是抗锯齿的,但不是很好)。这是一张显示我的问题的图片


在安卓系统下,如何提高抗锯齿的质量?

对于抗锯齿效果,您可以尝试创建如下绘制:

aPaint.setAntiAlias(true); // Enabling this flag will cause all draw operations that support antialiasing to use it.
aPaint.setFilterBitmap(True); // enable bilinear sampling on scaled bitmaps. If cleared, scaled bitmaps will be drawn with nearest neighbor sampling, likely resulting in artifacts.
apaint.setDither(true); // Enabling this flag applies a dither to any blit operation where the target's colour space is more constrained than the source.
aCanvas.drawBitmap(aBitmap, aJSrcRect, aJDestRectf, apaint);
Paint paint= new Paint();
paint.setFlags(Paint.ANTI_ALIAS_FLAG);
paint.setAntiAlias(true);
paint.setFilterBitmap(true); 
最后在画布上使用以下工具进行喷漆:

canvas.drawBitmap(mBitmap, 0.f, 0.f, paint)

paint.setAntiAlias(真);只是paint.setFlags(paint.ANTI_别名_标志)的助手;:(正如您在我给出的示例代码中看到的,它已经是我所做的了:(您找到任何解决方案了吗?