jayrambhia / CropperNoCropper

Instagram Style Image Cropper for Android (Library)
http://www.jayrambhia.com/project/nocropper-library
Apache License 2.0
475 stars 99 forks source link

After crop some part of new image is coming with white space #6

Closed anvesh523 closed 8 years ago

anvesh523 commented 8 years ago

http://imgur.com/a/j1Tew

I think some guy raised an issue about border, screenshot_2015-12-10-19-15-23

-> If imageview having free space it's creating white space along with image. ->

crop_test

Please resolve this ASAP .....

Thank you.

anvesh523 commented 8 years ago

I checked setMinZoom, it's not working !!!!!

jayrambhia commented 8 years ago

That's intentional. As mentioned in the description, the cropper gives a square image and if the image is not square, it adds padding to it and returns a square image. https://github.com/jayrambhia/CropperNoCropper/blob/master/nocropper/src/main/java/com/fenchtose/nocropper/CropperImageView.java#L606

You can set paddingColor in xml. Setting padding color is not currently supported in code.

anvesh523 commented 8 years ago

@jayrambhia Yes, If either I am adding padding color or not my expected image is not coming (coming with some extra boarder), If you have any option please let me know without padding.

anvesh523 commented 8 years ago

My suggestion if I can set setMinZoom is Math.min( width , height ) of image then It can't show the padding part. I tried in my code setMinZoom, But it's not working. I think It's taking max ( width, height ). Can you took it once please ....

jayrambhia commented 8 years ago

It will show the padding because the cropper gives out the square image and that was its primary function when I made it. I'll see if I can change it or not.

anvesh523 commented 8 years ago

Thank you for that, If setMinZoom will works my problem is solved.

jayrambhia commented 8 years ago

Fixed this.