Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native : mix blend mode possible?

Tags:

react-native

is it possible to use mix-blend-mode in RN?

    style={{
      mixBlendMode: 'overlay'
    }}

Got invalid props.style key

like image 448
sebap Avatar asked Oct 25 '25 05:10

sebap


1 Answers

If you need to blend images you can try my react-native-image-filter-kit this way:

    import { Image } from 'react-native'
    import { OverlayBlend } from 'react-native-image-filter-kit'

    const imageStyle = { width: 320, height: 320 }
    
    const tahoe = (
      <Image
        style={imageStyle}
        source={{ uri: 'https://una.im/CSSgram/img/tahoe.jpg' }}
        resizeMode={'contain'}
      />
    )

    const cacti = (
      <Image
        style={imageStyle}
        source={{ uri: 'https://una.im/CSSgram/img/cacti.jpg' }}
        resizeMode={'contain'}
      />
    )

    const blended = (
      <OverlayBlend
        dstImage={tahoe}
        srcImage={cacti}
      />
    )

result

like image 102
iyegoroff Avatar answered Oct 26 '25 22:10

iyegoroff