The last argument to all Canvas.drawBitmap* methods is a Paint object and most of the examples I found on internet were passing a null for it. To avoid, rather reduce, the pixelation we need to use this Paint object. Create a paint object as mentiond below and pass it as a last argument to your drawBitmap() call.
Paint paint= new Paint(Paint.FILTER_BITMAP_FLAG | Paint.DITHER_FLAG | Paint.ANTI_ALIAS_FLAG);This will significantly reduce pixelation and your app will look a lot better.
No comments:
Post a Comment