Closed AnswerZhao closed 7 years ago
I confirm. Video: http://dropmefiles.com/UEQjI Scale and translation gesture are activated.
@polyak01 It can't works.
@AnswerZhao do you try to setMinScale(0.1f)?
@polyak01
float scaleFactor = detector.getScaleFactor(); float newScale = matrixUtils.getScaleX(imageMatrix) * scaleFactor;
When the photo is too small, the newScale value is too lager than the maxScale.(70*70Px, the newScale is 25), so i think the scale value is not perfect. I change the method isValidScal() to resolve it finally.
@polyak01 I set MaxScale to 9f (minimum value at which it start working with my (409*103) picture) and MinScale to 0f. It works, but it works strange. Until I set the frame with the same aspect ratio as the picture itself, I can not reduce the image. In addition, scale gestures work only outside the crop area. (Video: http://dropmefiles.com/DbG2d)
@vellrya 9 is not work for everything, you can try a 43*43 picture.
Okay. I decided for myself this problem. I completely removed Min and Maxscale and did this:
cropView.configureOverlay()
.setAspectRatio(AspectRatio.IMG_SRC)
.apply()
Now I can correctly move and scale small pictures. (http://dropmefiles.com/KQByj) It remains only to wait for the ability to rotate pictures in this library)
@AnswerZhao Did you solved the problem?
@polyak01 Yep. You can change the implement of the method isValidScal() ,or increase the maxScale, or remove the limits of maxScale.
When the loaded photo is too small , the image can't scale by touching.