Unable to crop an image correctly

testimagecrop.aia (65.8 KB)


Hi, this app lets you shoot or load an image, then touch it. A 30 width by 20 height rectangle is drawn centered on the point you touched. When you press Crop, only this small part of the image should remain, and all else discarded. But this is not what happens. I have uploaded the aia file, and the blocks as image. What have I done wrong?

Let me take this opportunity to thank all who helped me earlier, this was in connection with the camera making a shutter noise (my apologies to Taifun for not respecting his terms and conditions for his camera extension). My app takes photos every few seconds of the face of a severely disabled person who cannot speak, and alerts caregivers when changes in the photo suggest he has woken up. The app is working fine, and in use by his grateful family. So now we want to go further, and allow the patient to give commands to the phone with his eyes by moving them left or right. For automatic image classification, we want to only use the portion of the image showing an eye, to minimize noise, hence the cropping. Any suggestions on how to do this better would be appreciated.
Warmly,
Arun

Try working from the actual image height and width:

1 Like