have a try:
Matrix matrix = new Matrix();
matrix.postScale(ZOOM_RATE[zoomIndex],
ZOOM_RATE[zoomIndex]);
resizeBitmap = Bitmap.createBitmap(bitmapOrg, 0, 0,
bitmapOrg.getWidth(),
bitmapOrg.getHeight(), matrix, true);
bmd = new BitmapDrawable(resizeBitmap);
imgBody.setImageDrawable(bmd);
On Aug 28, 7:58 am, mgpc <[email protected]> wrote:
> Hi,
>
> I'm trying to scale/rotate an image using setImageMatrix, and it seems
> to have no effect. I've done a lot of Googling and found some people
> mentioning similar problems, but found no solution. Any suggestions?
>
> This is what I'm doing:
>
> mainImage = (ImageView) findViewById(R.id.BigImage);
>
> Matrix matrix = new Matrix();
> matrix.postRotate(270);
> matrix.postScale(320, 480);
> mainImage.setImageMatrix(matrix);
>
> mainImage.setImageDrawable(mDrawable);
>
> mainImage.invalidate();
>
> I expect to see some rotation/scaling, but the image stays unchanged.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---