Hello,
I'm currently trying to crop images on Android. However when using the crop method from the sample application. I can't define my cropping place. Even after I added a function to change the MIRect value. When debugging it does contain the right values. But when cropping it goes back to the top left corner like the original RECT that is declared in the sample app.
Is there any way to crop the image on the place where the rectangle is placed? Or do you have any information on how to crop the image properly?
Comments
3 comments
Hello!
Image can be cropped with the FineCrop. The parameters of the rectangle that is needed to be cropped should be send to it. It can be done by providing x,y,width and height of the cropping area or by the results referencing between the functions.
As you absolutely correctly mentioned, in our standard MI SDK sample the upper left corner of the image is cropped when using the “Crop” function. We've set the MIRect value in the sample to MIRect(300, 300, 600, 700) and have processed the sample image. The rectangle with the coordinates (300, 300, 600, 700) has been cropped correctly:
Hope this information will be useful. If you have any other questions about this functionality, please address them to SDK_Support@abbyy.com.
Yes i am actually trying to send the parameters to the finecrop. When debugging the RECT variable has my variable values but it still crops the above left corner.
I come to the conclusion that even when the width and height is around 600 and the starting point around 500 x & y. it still crops the image way to far to the upper corner. There is something going wrong with the values of the width and heights when cropping.
Any clue what the problem might be?
Here are some screens to clear some things up.
As you might see it just doesnt crop on the right place.
Hi!
Thank you for the response. For the further investigation could you please provide us with your project and sample images so we can reproduce the issue on our side? Please send it to SDK_Support@abbyy.com. Thank you in advance.
Please sign in to leave a comment.