krop icon indicating copy to clipboard operation
krop copied to clipboard

Get cropped bitmap from bitmapTransformation

Open maigra opened this issue 3 years ago • 4 comments

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

maigra avatar Apr 14 '21 14:04 maigra

Hi! Thanks for the report.

@Kutashov , could you please take a look?

eugene-krivobokov avatar Apr 14 '21 19:04 eugene-krivobokov

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

Kutashov avatar Apr 14 '21 20:04 Kutashov

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

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

maigra avatar Apr 14 '21 20:04 maigra

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.

Kutashov avatar Apr 15 '21 07:04 Kutashov