Open thomascouto opened 1 year ago
Hello, I'm trying to use get-pixels with Uint8array, but I'm stuck in this error.
TypeError: Path must be a string. Received {"0":255,"1":216,"2":255,"3":224,"4":0,"5":16,"6":74,"7":70,"8":73,"9":..........................255}
Types: declare function getPixels(path: string | Uint8Array, type: string, callback: Callback): void
Test code: const arr = new Uint8Array(path);
console.log(arr); //is a Uint8array
getPixels(arr, 'image/jpg', (err, pixels) => { console.log(pixels); });
Any suggestions ?
Hello, I'm trying to use get-pixels with Uint8array, but I'm stuck in this error.
TypeError: Path must be a string. Received {"0":255,"1":216,"2":255,"3":224,"4":0,"5":16,"6":74,"7":70,"8":73,"9":..........................255}
Types: declare function getPixels(path: string | Uint8Array, type: string, callback: Callback): void
Test code: const arr = new Uint8Array(path);
console.log(arr); //is a Uint8array
getPixels(arr, 'image/jpg', (err, pixels) => { console.log(pixels); });
Any suggestions ?