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 tried manipulating a PNG and writing it and it worked, but as soon as I tried any GIF, it crashes.
Steps to Reproduce
jimp.read() an image
modify it (optional)
write it to a file with a .gif extension
Code:
jimp.read(/* PATH TO IMAGE */, (err, img) => {
if (err) throw err;
img.write(`./gif.gif`)
})
Context
Jimp Version: v0.16.1
Operating System: Windows 10 20H2 Build 19042.867
Node version: v14.15.0
Failure Logs
_stream_writable.js:285
TypeError [ERR_INVALID_ARG_TYPE]: The "chunk" argument must be of type string or an instance of Buffer or Uint8Array. Received an instance of Promise
at WriteStream.<anonymous> (F:\Projects - PATH\node_modules\@jimp\core\dist\index.js:589:18)
at WriteStream.emit (events.js:315:20)
at internal/fs/streams.js:380:12
at FSReqCallback.oncomplete (fs.js:171:23) {
code: 'ERR_INVALID_ARG_TYPE'
}
The text was updated successfully, but these errors were encountered:
Any solution to this? My jimp implementation also reads and writes jpegs/pngs but gifs are not written.. the resulting file from uploading/writing a new gif is empty
Expected Behavior
Write GIF to file
Current Behavior
It crashes, for seemingly no reason.
Failure Information (for bugs)
I tried manipulating a PNG and writing it and it worked, but as soon as I tried any GIF, it crashes.
Steps to Reproduce
Code:
Context
Failure Logs
The text was updated successfully, but these errors were encountered: