You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm utilizing nut.js in my project to capture the screen. I want to give the buffer from that operation to get-pixels. When I do though, I get this error:
Error: Invalid file signature
at module.exports.Parser._parseSignature (/private/tmp/o/node_modules/get-pixels/node_modules/pngjs/lib/parser.js:53:18)
at module.exports.ChunkStream._processRead (/private/tmp/o/node_modules/get-pixels/node_modules/pngjs/lib/chunkstream.js:174:13)
at module.exports.ChunkStream._process (/private/tmp/o/node_modules/get-pixels/node_modules/pngjs/lib/chunkstream.js:193:14)
at module.exports.ChunkStream.write (/private/tmp/o/node_modules/get-pixels/node_modules/pngjs/lib/chunkstream.js:61:8)
at module.exports.ChunkStream.end (/private/tmp/o/node_modules/get-pixels/node_modules/pngjs/lib/chunkstream.js:74:10)
at exports.PNG.PNG.end (/private/tmp/o/node_modules/get-pixels/node_modules/pngjs/lib/png.js:98:16)
at exports.PNG.PNG.parse (/private/tmp/o/node_modules/get-pixels/node_modules/pngjs/lib/png.js:88:8)
at handlePNG (/private/tmp/o/node_modules/get-pixels/node-pixels.js:17:7)
at doParse (/private/tmp/o/node_modules/get-pixels/node-pixels.js:109:7)
at getPixels (/private/tmp/o/node_modules/get-pixels/node-pixels.js:140:5) undefined
Does anyone have any advice on how to make this work, or am I running into a bug? Thanks.
The text was updated successfully, but these errors were encountered:
KolbySisk
changed the title
Invalid file signature error when using get-pixels with nut.js
Invalid file signature error when using buffer from nut.js
Mar 4, 2022
Hi all,
I'm utilizing nut.js in my project to capture the screen. I want to give the buffer from that operation to get-pixels. When I do though, I get this error:
This is my code:
screenCapture.data
is an image buffer, which when console logged looks like:<Buffer d5 86 f5 ff d4 86 f5 ff d4 86 f5 ff d4 86 f5 ff d4 86 f5 ff d5 86 f5 ff d4 86 f5 ff d4 86 f5 ff d4 86 f5 ff d4 86 f5 ff d4 86 f6 ff d5 87 f5 ff d4 87 ... 8294350 more bytes>
Does anyone have any advice on how to make this work, or am I running into a bug? Thanks.
The text was updated successfully, but these errors were encountered: