Search code examples
androidimageresizecrop

Android- Image resize and cropping


I am using a library to choose an image from the gallery and crop it. However, I found an option for rotating the image as well. Here's the link to the library I'm using.

In my code I'm accessing the provided functionality similar to the example given in the library. There are 2 questions I have.

  1. The Image I choose from the gallery is always rotated in some order (either clock or anti-clock) upon searching for solution I understood that this is caused due to large size of the Image. But, cant find a good solution to resize the image, given that I have to use this library.

  2. Though the Image rotation works fine, and I'm able to crop the image properly, but the resultant cropped image is still rotated with the cropped part section equivalent to what I cropped. Sorry, I can't post Images due to less repo points.

Thanks


Solution

  • Okay, So I couldn't find any easy way to do this. But there is an old repository on git that I looked into (Click here) and tweaked a little to get what I wanted. I tweaked the aspect ratio and the layout design to make it look good!

    Thanks for all the help.