Created
February 20, 2022 21:12
-
-
Save BolajiAyodeji/c2270e9b93d6383343fca0046c9f9525 to your computer and use it in GitHub Desktop.
This file contains 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 gm = require("gm").subClass({ imageMagick: true }); | |
const fs = require("fs"); | |
const images = fs.readdirSync("./images"); | |
images.forEach((image) => { | |
gm(`./images/${image}`).write( | |
`./prc/${image.slice(0, 11)}.jpg`, | |
(err) => { | |
if (!err) console.log("✅ done"); | |
} | |
); | |
}); | |
// gm(`./images/${matnum}`).identify(function (err, data) { | |
// if (!err) console.log(data); | |
// }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment