iyegoroff / react-native-image-filter-kit

Various image filters for iOS & Android
MIT License
320 stars 43 forks source link

onExtractImage doesn't execute #30

Closed armin23615 closed 4 years ago

armin23615 commented 4 years ago

Platform: iOS react-native: 0.60 react-native-image-filter-kit: 0.5.18

Documentation says that onExtractImahe will trigger when extractImageEnabled changes to true. Click on SAVE updates enableExtract state, but onExtractImage isn't executed. I'm trying to get filtered image path.

<Grayscale 
           onExtractImage={(nativeEvent) => console.log(nativeEvent.uri)}
            extractImageEnabled={this.state.enableExtract}
            amount={1}
            image={
              <Image
                style={styles.documentImage}
                source={{ uri: image }}
                resizeMode={'contain'}
              />
            }
/>  

<Button onPress={() => this.setState({ enableExtract: true })}>
    <Text style={styles.footerButtonText}>SAVE</Text>
</Button> 
armin23615 commented 4 years ago

Solved it by installing version 0.7.0.

onExtractImage doesn't work on older versions.