GregoryNative / react-native-gl-image-filters

React-Native image filters using gl-react
MIT License
248 stars 35 forks source link

【Question】How to display local image? #30

Closed obscure723 closed 3 years ago

obscure723 commented 3 years ago

Hi, i am using your library. and i have a question.

I'm using expo-image-picker and app user can pick up a image from photo gallery. so how to display picked image and filter it.

<Surface style={style} ref={ref}>
    <ImageFilters
        hue={imageFilter.hue}
        blur={imageFilter.blur}
        sepia={imageFilter.sepia}
        sharpen={imageFilter.sharpen}
        negative={imageFilter.negative}
        contrast={imageFilter.contrast}
        saturation={imageFilter.saturation}
        brightness={imageFilter.brightness}
        temperature={imageFilter.temperature}
        exposure={imageFilter.exposure}
        width={width}
        height={height}
    >
        {source}
    </ImageFilters>
</Surface>

this is my code. but there is black

please kindly check

GregoryNative commented 3 years ago

Hello @obscure723, that's related to issue on gl-react-expo https://github.com/gre/gl-react/issues/236. This library is only wrapper, so there is no way from my side to help you.

Also check this https://github.com/brentvatne/blearexp, I found it as example how to use local images. Good luck!

obscure723 commented 3 years ago

Thank you so much.