avito-tech / krop

Small widget for image cropping in Instagram-like style
MIT License
126 stars 18 forks source link

Get cropped bitmap from bitmapTransformation #33

Open maigra opened 3 years ago

maigra commented 3 years ago

Hi, I try to get cropped bitmap from myBitmap.transformWith with saved bitmapTransformation object, but I get empty bitmap. How I can get it?

eugene-krivobokov commented 3 years ago

Hi! Thanks for the report.

@Kutashov , could you please take a look?

Kutashov commented 3 years ago

Hi, @maigra. Please, provide an example of a flawed bitmap to consider the issue.

maigra commented 3 years ago

https://drive.google.com/drive/folders/18WGymK4IsJYeGQt7WkIokUwJgvLpY7O4?usp=sharing

There is original photo and saved cropped from myBitmap.transformWith. I load photo by glide

Kutashov commented 3 years ago

Well, I checked your image within the demo app (you also can fork our repo and launch it) and see no problem.

You should keep a closer eye on your projects' traits: layouts, glide settings, use of custom overlay, how you treat transformation object, and if it's not empty. Besides, check whether you have an exception while transformWith call (https://github.com/avito-tech/krop/blob/master/krop/src/main/java/com/avito/android/krop/util/BitmapTransformation.kt#L61) or any others, such as OOM, while creating result bitmap. Let us know, what you find out.