How to give the path of local image to add in canvas. #245
Unanswered
PatilRupaliAress
asked this question in
Q&A
Replies: 2 comments
-
@PatilRupaliAress, And use it with like this : const file : 'whatYouWant/img.png' ;
const image = new Image(canvas);
image.addEventListener('load', () => {
ctx.drawImage(image, x, y, w, h);
});
image.src = (Platform.OS === 'android' ? 'file:///android_asset/' : '') + file ; |
Beta Was this translation helpful? Give feedback.
0 replies
-
Does this only work in the release version? How to use the debug version? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was loading the local images which are stored in project. But this images are not loading in canvas.But when I load the images from web its working fine. What should I do ?
Beta Was this translation helpful? Give feedback.
All reactions