Replies: 1 comment
-
Data uri is supported via import { loadImage } from '@napi-rs/canvas'
const image = await loadImage('dataUri') You can also find the test for it here canvas/__test__/loadimage.spec.ts Lines 33 to 38 in 171a20e |
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 have image data which is dataUrl,Though dataUrl could be parsed to buffer
Buffer.from(dataUrl.split(',')[1], 'base64');
but brings a little performance loss.Beta Was this translation helpful? Give feedback.
All reactions