Closed catalin-florescu closed 8 years ago
@Cataalinn can you make sure you are loading file once flushing to disk has finished? it sounds like that operation has not completed when you start your other activity.
In our sample we use rxjava to observe when flushing is completed, and then we start the other Activity, please make sure you use as similar approach when using extensions or alternatively you can use just use Bitmap result = cropView.crop();
to obtain the Bitmap and save it to disk at your convenience.
@eveliotc what do you mean once Flushing to disk has finish?
@Cataalinn it means when writing all the bits that compose your image format into the file has completed. If you read the file before that it will likely be empty or partial (corrupted). For your information here is how extensions write to file.
After crop, if i send picture via intent like in sample with Picasso, most of the times does nothing because file is corrupted or other causes. I made an AsyncTask with weak reference to load bitmap. I set image to crop, first time resulted bitmap is null. Second time bitmap is decoded successful. Is decoding when he wants. I do something wrong or is some bug? I followed the sample at first time and it isn't work at all.