I set image From Gallery and Camera to Imageview.I used Touchimageview for pinch Zoom Functionality for imageview.
Here is Link For this Touchimageview : https://github.com/MikeOrtiz/TouchImageView/blob/master/src/com/ortiz/touch/TouchImageView.java
But image is not set ProPerly in Imageview.
In the Picture,
The left side is What Actually happen with me.
The Right side which i wanted Fit to imgeview same as Imageview height.
I Used ScaleType = "CenterCrop" But After That i Cant able to Zoom in Out in Imageview.
1).How to Crop Bitmap Like Fit to imageview with keep aspect resio?
2).or How to set Image From gallery or camera to Fit To imageview And Add Zoom in out Functionality?
Help me to Solve This issue
Thanks You in Advance
For zoom-able ImageView user Gesture ImageView Library
You can download library from here, it's easy to use. this library provides you zoomable ImageView so use Gesture ImageView instead of Simple ImageView
https://github.com/jasonpolites/gesture-imageview
use android:scaleType="fitxy". Make sure your image is of higher resolution, otherwise the image will lose its quality. It may also look stretched if it the image doesn't maintain aspect ratio
Related
I have implemented custom imageView with a pinch option. Now I stuck in after pinch whatever the image visible in imageview. Only get the pinched/visible image as cropped & set that cropped image to another imageview. Pls, help to achieve this.
How can i fit the ImageView without stretching? I've already tried all 'scaleType' but no one works. this image is from instagram API.
When i use 'Matrix' scaleType.
Depends which side you want to fit.
You can resize bitmap if you need some custom fit.
You can use 'scaleType' centerCrop to fill all ImageView.
P.S. but if you want to make rectangle picture from square one, without losing some part of picture - you have no chance, it is impossible anyway.
Maybe it is better for you to resize ImageView to fit image ratio.
I can't use scale-type because it's not an imageview.
I am trying to implement a crop image for my app.
What I want to do is that I've an imageview set to 300x300 .I am taking images from
CAMERA and GALLERY now the images can be bigger than 300x300. I want to implement
a cropping tool using which I can drag the image inside imageview so that I can select the useful portion of 300x300 of the image.
I want to implement the same feature which this app implemented for cropping.
Can anyone point me in the right direction ?
Try this:
https://github.com/biokys/cropimage
But if you want to drag and fit useful portion of a image in a Imageview than you can use MultiTouch View.
https://code.google.com/p/android-multitouch-controller/
You can move the image on a custom view. Zoom and Pinch. Once you found the useful area. Take a screenshot of the imageview.
hope any of the solutions helps :)
how to implement image rotation and image scaling on android imageview means suppose we have a image we want to image large and small by stretch from image corner like photoshop how to implement this feature
It may help you :
http://android-er.blogspot.in/2010/07/skew-bitmap-image-using-matrix.html