Open lpatiny opened 1 year ago
I'm using a webcam and I have a code like:
const imageSrc = webcamRef.current.getScreenshot(); const response = await fetch(imageSrc); const arrayBuffer = await response.arrayBuffer(); const image = decode(new Uint8Array(arrayBuffer));
I didn't know this trick to convert a dataURL to arraybuffer.
Should there be a static method readURL in image-js that does allows a URL or dataURL ?
readURL
I suggest we implement fetchURL which uses the fetch API internally (in node and the browser).
fetchURL
I'm using a webcam and I have a code like:
I didn't know this trick to convert a dataURL to arraybuffer.
Should there be a static method
readURL
in image-js that does allows a URL or dataURL ?