Crop photo taken from camera

Hi everyone,

i’ve create an custom camera that has an view controller with that the user can select the portion of photo to take. like a cropper. the problem is that the taken photo is bigger than camera and when try to crop, it crops in not right place.

How can I crop the photo rightly?

Hi @rufy

I assume you are taking the exact position/size of the crop rectangle and apply to your image, right?
What you can do is to calculate ratio between your camera view and your result image. And then multiply your original rectangle position/size to that ratio.

Hope this helps.

Nikita

This topic was automatically closed after 166 days. New replies are no longer allowed.