Samsung S8 → take photo → returns uri + width and height. With ImageManipulator crop with 0,0 and width and height from camera both minus a small arbitrary of pixels → error crop rect not in picture when it should definitely be in the picture / valid.
With a little trial and error, if I divide width and height returned by the camera by 2 → works fine and I get basically the full image minus that little bit. If I divide by 2 and add a couple pixels → rectangle not in picture as expected. So it seems its a factor of 2 out for some reason.
I then came across this bug with resizing:
So maybe something to do with screen resolutions / pixel ratio.
Which is the bit that is really confusing me, PixelRatio.get() → returns 3.5 for my S8… not 2… So it seems somewhat unrelated to different resolutions / I cant work around it with pixel ratio.
I dont know where 2 comes from / what is safe to use / how to work around this. I need to use the camera and with an overlay help the user take a picture → crop out sections of it accurately.
Any help or insight would be great thanks.