aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlaze <[email protected]>2022-05-01 02:09:32 +0800
committerGitHub <[email protected]>2022-05-01 02:09:32 +0800
commit45c3930c95a2d6c47a7888ef5a58c85414650add (patch)
tree44448b9dfb7a13f7dbd0204c36a4aa9a91a609fe
parentUpdate Readme.md (diff)
downloadcounter-45c3930c95a2d6c47a7888ef5a58c85414650add.tar.xz
counter-45c3930c95a2d6c47a7888ef5a58c85414650add.zip
feat: render images as pixelated
This removes the smoothing filter and makes sure the pixels stay the same no matter how much you zoom in.
-rw-r--r--utils/themify.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/themify.js b/utils/themify.js
index 2db9886..5487a83 100644
--- a/utils/themify.js
+++ b/utils/themify.js
@@ -53,7 +53,7 @@ function getCountImage({ count, theme='moebooru', length=7 }) {
}, '')
return `<?xml version="1.0" encoding="UTF-8"?>
-<svg width="${x}" height="${y}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<svg width="${x}" height="${y}" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="image-rendering: pixelated;">
<title>Moe Count</title>
<g>
${parts}
@@ -64,4 +64,4 @@ function getCountImage({ count, theme='moebooru', length=7 }) {
module.exports = {
getCountImage
-} \ No newline at end of file
+}