iyegoroff / react-native-image-filter-kit

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

Image is rotated after extraction #40

Closed armin23615 closed 4 years ago

armin23615 commented 4 years ago

Platform: iOS RN version: 0.60.5 Package version: 0.7.0

onExtractImage returns image rotated 90 degrees to the left. Any idea why is this happening?

<Grayscale
            onExtractImage={({ nativeEvent }) => this.setState({ filteredImage: nativeEvent.uri })}
            extractImageEnabled={this.state.enableExtract}
            amount={0.9}
            image={
              <Contrast
                amount={1.3}
                image={
                  <Image
                    style={{ height: this.state.viewHeight, width: this.state.viewWidth }}
                    source={{ uri: this.state.filteredImage }}
                    resizeMode={'contain'}
                  />
                }
              />
            }
          />
armin23615 commented 4 years ago

Actually it was RN Camera problem. It was rotating photo if filters were applied. Setting forceUpOrientation: true solved it.