I had a look at your project, I get also an error when beginning outsides the CropView.
I have not yet investigated more deeply into it, it is insides the CropView class.
Maybe you could have a look at this [B4X] [XUI] xResizeAndCrop, it's cross platform.
I had a look at your project, I get also an error when beginning outsides the CropView.
I have not yet investigated more deeply into it, it is insides the CropView class.
Maybe you could have a look at this [B4X] [XUI] xResizeAndCrop, it's cross platform.
To fix the error when beginning outsides the CropView: add line 1 and 2
Fix for Private Sub DrawRect:
If SelectionRect.Bottom < 1 Then Return
If SelectionRect.Right < 1 Then Return
For y = SelectionRect.Top To SelectionRect.Bottom - 1
TargetBC.SetARGB(SelectionRect.Left, y, a)
TargetBC.SetARGB(SelectionRect.Right - 1, y, a)
Next
For x = SelectionRect.Left To SelectionRect.Right - 1
TargetBC.SetARGB(x, SelectionRect.Top, a)
TargetBC.SetARGB(x, SelectionRect.Bottom - 1, a)
Next
This fix ignore the update when start outside the picture.
A clever and a very nice and useful way to display details from a picture.