Last active
November 13, 2016 15:46
-
-
Save RcrdBrt/1aa5c1f6e3915fdc70a77ca7fe0d25de to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const sharp = require('sharp'); | |
const path = require('path'); | |
if(process.argv.length < 3) { | |
console.log('You must provide an image as a cmd-line argument!'); | |
process.exit(-1); | |
} | |
sharp(process.argv[2]).toFile(''+ process.argv[2].slice(0, process.argv[2].indexOf('.'))+'.jpg'); | |
console.log('Done!'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment