iyegoroff / react-native-image-filter-kit

Various image filters for iOS & Android
MIT License
317 stars 42 forks source link

How to apply filter to ONLY non transparent part of the image #133

Open Adeel984 opened 1 year ago

Adeel984 commented 1 year ago

First of all thanks for this great package, I need to apply filter to images which has transparent background but when i apply filter it shows filter color on the transparent side.

Any help would be highly appreciated.

Thank you. Screenshot_1671641377

alexpovkolas commented 1 year ago

If anybody still needs that a composition filter does the trick:

<DstInComposition resizeCanvasTo={"srcImage"} srcImage={<Image style={style} source={yourImage} />} dstImage={<YourFilter {...props} />} />