diff options
author | Minteck <contact@minteck.org> | 2022-10-10 20:51:39 +0200 |
---|---|---|
committer | Minteck <contact@minteck.org> | 2022-10-10 20:51:39 +0200 |
commit | 108525534c28013cfe1897c30e4565f9893f3766 (patch) | |
tree | dd3e5132971f96ab5f05e7f3f8f6dbbf379a19bd /assets/icons/icongen.js | |
parent | 2162eaa06f7e4764eb3dcfe130ec2c711d0c62ab (diff) | |
download | pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.gz pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.tar.bz2 pluralconnect-108525534c28013cfe1897c30e4565f9893f3766.zip |
Update
Diffstat (limited to 'assets/icons/icongen.js')
-rw-r--r-- | assets/icons/icongen.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/assets/icons/icongen.js b/assets/icons/icongen.js index 694b063..1d591bf 100644 --- a/assets/icons/icongen.js +++ b/assets/icons/icongen.js @@ -7,9 +7,15 @@ 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"); + if (fs.existsSync("./uncolored/" + name + ".svg")) { + console.log(name + "*"); + exec("convert -density 1200 -resize 448x448 -border 56x56 -bordercolor \"rgba(0,0,0,0)\" -channel RGB -depth 32 -negate -background none ./uncolored/" + file + " ./favicon/" + name + "-pre.png"); + exec("convert -composite -compose Dst_Over -gravity center -depth 32 -geometry 512x512 ./favicon/" + name + "-pre.png ../logo/newlogo-template.png -set colorspace RGB ./favicon/" + name + ".png"); + } else { + console.log(name); + exec("convert -density 1200 -resize 448x448 -border 56x56 -bordercolor \"rgba(0,0,0,0)\" -channel RGB -depth 32 -negate -background none " + file + " ./favicon/" + name + "-pre.png"); + exec("convert -composite -compose Dst_Over -gravity center -depth 32 -geometry 512x512 ./favicon/" + name + "-pre.png ../logo/newlogo-template.png -set colorspace RGB ./favicon/" + name + ".png"); + } fs.unlinkSync("./favicon/" + name + "-pre.png"); }
\ No newline at end of file |