Created
June 6, 2021 12:21
-
-
Save hoangsetup/f4e5921c27ea7d610e392fa2c5c1bf54 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
import * as fs from 'fs'; | |
import * as path from 'path'; | |
import GlassifyLib from './glassifyLib'; | |
(async () => { | |
const imageBuffer = fs.readFileSync(path.join(__dirname, '../', 'public/images/demo.jpg')); | |
const output = await GlassifyLib.glassify(imageBuffer); | |
await fs.writeFileSync( | |
path.join(__dirname, '../', `public/images/output_${Date.now()}.jpg`), | |
output, | |
); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment