我有一个像素艺术,我想扩大规模.问题是当我扩展它时,它会得到抗锯齿的所有模糊原因.有没有办法直接从xml禁用抗锯齿?
解决方法:
我希望它有用
Bitmap bmpSource = BitmapFactory.decodeResource(getResources(), SourceFileId);
//100 is dimension to resizing image size
//Passing filter = false will result in a blocky, pixellated image.
//Passing filter = true will give you smoother edges
Bitmap bmpScaled = Bitmap.createScaledBitmap(bmpSource, 100, 100, false);
ImageView img = (ImageView) findViewById(Your imageView Control Id);
img.setImageBitmap(bmpScaled);
这就是你想要的!?