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.
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]?
I recently tried the same thing but ended up using a library since it covered a lot more edge cases. This is a great, and pretty widely used library:
http://code.google.com/p/android-multitouch-controller/
I think I can help you with the rotation part. I recently made an android wheel menu library. It tracks user's hand motion and rotates the imageview accordingly. You can check out the source to see how I did it here:
https://github.com/anupcowkur/Android-Wheel-Menu
Bitmap rotation
Image Scaling Scaling
Image moving Image in Canvas with touch events
You can use Matrix transaformation to achieve rotating, scaling, and moving....I hope this will help you....
for rotating
for scaling
create new bitmap without changing the original one...like this
You can https://github.com/siddhpuraamitr/MultitouchWithDynamicAddandRemove try this code in your project
Using Library : StickerView
Its a 3rd Party Library which gives exactly what i was looking for.
WorkAround :
Still these answer is half of what I've asked for in OP. Means It ain't surronded by some specific Indicator. I'm still searching how to wrap
ImageView
with indicators and use them for Translate & Resize.Initilization of Variables inside
Activity
important for Translate & ResizeImageView
Setting
ImageView
to scaleType -Matrix
Adding onTouch Listener to
ImageView
which uses2 Finger for Zoom - Resize {Pinch To Zoom}