Hello David, thank you for the add-on, a very useful one. I'm encountering

Hello David, thank you for the add-on, a very useful one.
I’m encountering a problem related to the following:
I want to get the cropped image and store it somewhere in the file system. I have used the code found in your example.

When I put the cropped image in a byte array
cropButton.addClickListener(event → {
dialog.close();
String imageUri = crop.getImageUri();
Image img = new Image();
img.setSrc(imageUri);
byte[] data = crop.getImageBase64();

the last line throws an exception:
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
at de.f0rce.cropper.Cropper.getImageBase64(Cropper.java:96) ~[cropperjs-1.0.0-Beta.jar:1.0.0-Beta]

This happens randomly, lets say round 40% of the cases and I cannot understand why.
Can you please help me on this?
Thank you in advance.

Hello Dritan,

this seems like a super odd issue. If I would have to say what causes it, I would say some kind of Vaadin racing condition (you press the crop button and vaadin is not done with its roundtrip and in the meanwhile, my component tries to do the same).

Would you please open a new Issue over at the [GitHub Repository]
(https://github.com/F0rce/cropper/issues/new?assignees=&labels=&template=bug_report.md&title=) with some additional information ?

Thanks in advance,
David