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?

asked 29 May '15, 01:55

Jordi's gravatar image

Jordi
112


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:

alt text alt text

Hope this information will be useful. If you have any other questions about this functionality, please address them to SDK_Support@abbyy.com.

link

answered 29 May '15, 15:40

Anna%20Falevskaya's gravatar image

Anna Falevskaya ♦♦
715

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.

alt text alt text alt text

As you might see it just doesnt crop on the right place.

link

answered 29 May '15, 16:57

Jordi's gravatar image

Jordi
112

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.

(16 Jun '15, 18:46) Anna Falevskaya ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×52
×22
×3

Asked: 29 May '15, 01:55

Seen: 1,735 times

Last updated: 16 Jun '15, 18:46

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal