image processing - How to convert filetype using GraphicsMagick for node.js -


how "convert" file 1 type using gm? (e.g .png > .jpg)

i found this doesn't seem the node.js version has same method:

you'll need change format of output file.

var writestream = fs.createwritestream("output.jpg"); gm("img.png").setformat("jpg").write(writestream, function(error){     console.log("finished saving", error); }); 

http://aheckmann.github.io/gm/docs.html#setformat


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -