Closed simonh1000 closed 8 years ago
Hmmm ... sorry for being so slow getting back. Is this issue still presenting?
Can't reproduce on Windows 7 using the following test script:
var Jimp = require("jimp");
Jimp.read("lenna.png").then( img => {
img
.resize(100, Jimp.AUTO)
.quality(75)
.write("lenna-100px.png");
})
.catch (err => reject(err) );
Does it still present on Windows 10?
I'll close as I have shipped code, so I think it must have fixed itself
This is still NOT FIXED, Jimp still saves 0 bytes images. Using Windows 10 Pro 1909. Simply reading resizing and saving. Trying to save img anytime in code causes 0 bytes images being saved.
I'll close as I have shipped code, so I think it must have fixed itself
Nope it's obviously not
I'm seeing this too, but only in my production app, not my module tester...
I found an interesting situation. If I use image.write("filename.jpg") from within an async function which is called from a Promise, then it doesn't complete until the top-level Promise is completed, even if I use await.
The fix is to use the Async version every time it is being called from within any async process: image.writeAsync("filename.jpg"); I think I'll probably only use writeAsync going forward. The other one was creating strange problems, when used within async and Promises.
I use this snippets
the files are being created but have size 0 bytes in Win 10. All working on Ubuntu though. What could be wrong?