UPDATE Since the question was complicating and unclear, I'm rewriting my question to make it much simpler.
Given
- image (image uri for entire image; 600x600 image from the example)
- left(x-coordinate; 50 from the example)
- top(y-coordinate; 100 from the example)
- width(width of the image; 300 from the example)
- height (height of the image; 300 from the example)
what I want
- 300 x 300 image (which is cropped to the image)
- 70 x 70 image (I will ultimately resized image to 70 x 70 size)
Here is my example code
// render the part of the image
console.log(left); // 50
console.log(thumbSize); // 300
return (
<Image
source={{uri: image}}
style={selectedStyle(left, top, thumbSize)}/>
);
...
function selectedStyle(left, top, thumbSize) {
return {
left,
top,
width: thumbSize,
height: thumbSize
};
}
UPDATE from zvona's working demo, what I want is this.


