react-native-image-viewing icon indicating copy to clipboard operation
react-native-image-viewing copied to clipboard

Images are darker

Open subratastack opened this issue 4 years ago • 3 comments

The images in the slideshow appears to be darker.

subratastack avatar Feb 18 '20 21:02 subratastack

I am also seeing this. It appears that the ImageView component opens them a little bit scrolled down. So i think the darkness comes from the swipe down effect where it should be darker.

But initially the images should load in the center and have not the darkness applied.

djschilling avatar Apr 08 '20 13:04 djschilling

I am currently also experiencing this issue. Are there any plans to fix this?

@flexsurfer Did you mitigate this in any way?

niklasarnitz avatar Nov 24 '22 09:11 niklasarnitz

Anyone who face with this problem, try a patch below.

diff --git a/node_modules/react-native-image-viewing/dist/components/ImageItem/ImageItem.ios.js b/node_modules/react-native-image-viewing/dist/components/ImageItem/ImageItem.ios.js
index 0708505..a0be5c9 100644
--- a/node_modules/react-native-image-viewing/dist/components/ImageItem/ImageItem.ios.js
+++ b/node_modules/react-native-image-viewing/dist/components/ImageItem/ImageItem.ios.js
@@ -57,7 +57,7 @@ const ImageItem = ({ imageSrc, onZoom, onRequestClose, onLongPress, delayLongPre
         onLongPress(imageSrc);
     }, [imageSrc, onLongPress]);
     return (<View>
-      <ScrollView ref={scrollViewRef} style={styles.listItem} pinchGestureEnabled showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false} maximumZoomScale={maxScale} contentContainerStyle={styles.imageScrollContainer} scrollEnabled={swipeToCloseEnabled} onScrollEndDrag={onScrollEndDrag} scrollEventThrottle={1} {...(swipeToCloseEnabled && {
+      <ScrollView contentInsetAdjustmentBehavior="never" ref={scrollViewRef} style={styles.listItem} pinchGestureEnabled showsHorizontalScrollIndicator={false} showsVerticalScrollIndicator={false} maximumZoomScale={maxScale} contentContainerStyle={styles.imageScrollContainer} scrollEnabled={swipeToCloseEnabled} onScrollEndDrag={onScrollEndDrag} scrollEventThrottle={1} {...(swipeToCloseEnabled && {
         onScroll,
     })}>
         {(!loaded || !imageDimensions) && <ImageLoading />}

mokoshi avatar Sep 28 '23 14:09 mokoshi