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
Is there a version available that has a non-stream API, for more modern code like this?
importfsfrom"fs/promises";imprt{PNG}from"pngjs";constdata=awaitfs.readFile(`input.png`);constimage=newPNG(data,{filterType: 4});// ...change the pixel data etc ...awaitfs.writeFile(`test.png`,image.toBytes());// then do more things with test.png now existing
(ever since promises and the async/await syntax landed into mainline JS, streams have become more an artifact of Node versions past)
The text was updated successfully, but these errors were encountered:
Is there a version available that has a non-stream API, for more modern code like this?
(ever since promises and the async/await syntax landed into mainline JS, streams have become more an artifact of Node versions past)
The text was updated successfully, but these errors were encountered: