diff options
author | Minteck <contact@minteck.org> | 2022-08-26 22:29:23 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-08-26 22:29:23 +0200 |
commit | 09bd0164ebc020a54b944b7326dcba496fb5d82c (patch) | |
tree | 0c5e765e627ecc94e534ccb6e2bc83917d58dc4c /assets/icons/icongen.js | |
parent | a2df9a69dcc14cb70118cda2ded499055e7ee358 (diff) | |
download | pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.tar.gz pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.tar.bz2 pluralconnect-09bd0164ebc020a54b944b7326dcba496fb5d82c.zip |
idk when was the last commit so I'm making a new one - Violet Dawn
Diffstat (limited to 'assets/icons/icongen.js')
-rw-r--r-- | assets/icons/icongen.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/assets/icons/icongen.js b/assets/icons/icongen.js new file mode 100644 index 0000000..694b063 --- /dev/null +++ b/assets/icons/icongen.js @@ -0,0 +1,15 @@ +const fs = require('fs'); +const exec = require('child_process').execSync; +const path = require('path'); + +let files = fs.readdirSync(".").filter(i => i.endsWith(".svg")); + +for (let file of files) { + let name = file.substring(0, file.length - path.extname(file).length); + + console.log(name); + exec("convert -density 1200 -resize 1000x1000 -channel RGB -depth 32 -negate -background none " + file + " ./favicon/" + name + "-pre.png"); + exec("convert -composite -compose Dst_Over -gravity center -depth 32 -geometry 1026x1026 ./favicon/" + name + "-pre.png ../logo/logo-template.png -set colorspace RGB ./favicon/" + name + ".png"); + + fs.unlinkSync("./favicon/" + name + "-pre.png"); +}
\ No newline at end of file |