I am using the following code to convert images from jpg to png:
gm('C:/random.jpg').stream('png', function (err, stdout, stderr) {
var writeStream = fs.createWriteStream('C:/reform.png');
stdout.pipe(writeStream);
});
It creates a 0 bytes image inside the folder.I have followed the answer on the thread https://stackoverflow.com/a/25389136/5141784 But all the three methods are generating the same result. Any help would be highly appreciated