Tuesday, January 14, 2014

Android ImageView Anti-aliasing

When doing gesture based multi-touch transformation on Android, the scaleType should be set to matrix.

view.setScaleType(ScaleType.MATRIX);

where view is an ImageView.

The default anti-aliasing processing is enabled. To turn off this anti-aliasing and use the nearest pixel subsampling, we may set setFilterBitmap to false, like

Drawable drawable = view.getDrawable();
drawable.setFilterBitmap(false);

No comments:

Followers

Blog Archive

About Me

My photo
HD Multimedia Technology player