terrylinla / react-native-sketch-canvas

A React Native component for drawing by touching on both iOS and Android.
MIT License
691 stars 450 forks source link

image background doesn't worl #202

Open Merrick17 opened 3 years ago

Merrick17 commented 3 years ago

i'm trying to add a new image to background but it doesn't show

mealCode commented 3 years ago

it actually work for some images, i am using:

"react": "17.0.2", "react-native": "0.65.1",

<RNSketchCanvas localSourceImage={{ filename: 'form_8bit.png', // e.g. 'image.png' or '/storage/sdcard0/Pictures/image.png' directory: 'SketchCanvas.MAIN_BUNDLE', // e.g. SketchCanvas.MAIN_BUNDLE or '/storage/sdcard0/Pictures/' mode: 'AspectFill', }} />

make sure you include image in drawer (in my case android)

android/app/src/main/res/drawable/form_8bit

but for long image or bigger size it won't