2011/02/28

[Android Dev.] Bitmap 회전하기

출처: http://www.higherpass.com/Android/Tutorials/Working-With-Images-In-Android/3/




ImageView image = (ImageView) findViewById(R.id.ivImage);
Bitmap bMap = BitmapFactory.decodeResource(getResources(), R.drawable.android);
image.setImageBitmap(bMap);

Matrix mat = new Matrix();
mat.postRotate(90);
Bitmap bMapRotate = Bitmap.createBitmap(bMap, 0, 0,
bMap.getWidth(), bMap.getHeight(), mat, true);
image.setImageBitmap(bMapRotate);

<

Original Post : http://neodreamer-dev.tistory.com/513

No comments :

Post a Comment