I'm making a object detection app in React Native. I send image to Google Vision Api and the api send back a JSON file that contain coordinate and size of objects. I want to draw rectangles that indicate objects. I don't know what is the proper way to do that. I'm trying put div elements on image for that. But there is a problem: My image element has resizeMode='contain' attirubute. So I don't know where is the x = 0, y = 0 point, what is the size.
<Image source = ... resizeMode='contain' style={{flex: 1}}/>
What can I do to get real position and size of image? Or is there any advice to draw that reactangles?