Open codeplaygoa opened 5 years ago
+1
+1
+1
+1 I have the same problem.
@ascoders same issue. +1
+1
It looks like iOS version does decent job in retaining image quality. But on Android, it gets very blurry.
+1
+1
is there a fix for this issue? or you guys found another image zoom library?
Facing the same exact issue, we cant figure out how to apply a workaround for this.
@ArtemKolichenkov Thanks for your hard work on the latest release! May I know will this issue be fixed in the upcoming release?
@johnlim5847 I will work on this issue today. Hopefully will find the solution quickly ๐
So I'm just gonna dump my findings here:
After being stuck with this problem for some time I ended up finding a workaround that solved the quality problem for Android in my case. My solution was to get the current scale from the react-native-image-zoom
through the onMove({scale})
method and multiply the height and width values โโof my image. Here's an example:
<ImageZoom
enableDoubleClickZoom={false}
onMove={this.onMoveZoom}
cropWidth={cropWidth}
cropHeight={cropHeight}
imageWidth={cropWidth * this.state.currentScale}
imageHeight={cropHeight * this.state.currentScale}>
<Image
style={{
width: cropWidth * this.state.currentScale,
height: cropHeight * this.state.currentScale,
}}
source={{uri: YOUR_URI}}
resizeMode="contain"/>
</ImageZoom>
I hope this helps.
check out this zoomable image component on stackoverflow could be helpful https://stackoverflow.com/a/37449923/11838322
Still no solution in 2021 with latest and increasing size does not work, nor does FastImage
I have image with small text in it. The image itself is hd so normally on zooming the text can be readable. But with react-native-image-zoom the image is scaled from the mentioned dimension of the Image component. Is it possible to zoom first to the maximum size of the original image and then starts scaling? Here you can see the text is getting blurred as you zoom https://snack.expo.io/rylljGstV