Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Putting some indicator around the image in image move/resize/rotate operations

I would like to Scale, Move, Resize Image. I would like to surround the image with Indicators which guide user what operation these indicators perform i.e. Moving, Rotating, Scaling.

enter image description here

I've tried

  • Scaling - but it only crops down. No chance to increase length and height of image.
  • Rotate - achieved but via inserting manual degrees. That's not a good option in here.
  • Moving - as I'm achieving drag on Api < 11. So little bit of difficult. Still no hope in here.

Is there any library which can do me simple image edit [Move, Scale, Rotate]?

like image 606
Vikalp Patel Avatar asked Feb 10 '13 16:02

Vikalp Patel


1 Answers

You can use Matrix transaformation to achieve rotating, scaling, and moving....I hope this will help you....

for rotating

Matrix matrix = new Matrix();     matrix.postRotate(90); 

for scaling

 matrix.postScale(scaleWidth, scaleHeight); 

create new bitmap without changing the original one...like this

Bitmap bmp2 = Bitmap.createBitmap(bmp1, 0, 0, pow2, pow2, matrix, true); 
like image 141
Pragnani Avatar answered Sep 21 '22 13:09

Pragnani