summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormsglm <msglm@techchud.xyz>2023-01-27 20:15:12 -0600
committermsglm <msglm@techchud.xyz>2023-01-27 20:15:12 -0600
commit90658eef55e38ecc977c4a0fd2ebcf92d4123b5d (patch)
treefe7c6869be6a93194e8d3566aa8fa9fa9f79417b
parent88c813566c346c6a0be249e053db558cc3e94407 (diff)
downloadmsglm-dotfiles-90658eef55e38ecc977c4a0fd2ebcf92d4123b5d.tar.gz
msglm-dotfiles-90658eef55e38ecc977c4a0fd2ebcf92d4123b5d.tar.bz2
msglm-dotfiles-90658eef55e38ecc977c4a0fd2ebcf92d4123b5d.zip
better documentation and an output directory for sovl-dither
-rwxr-xr-x.local/bin/sovl-dither19
1 files changed, 13 insertions, 6 deletions
diff --git a/.local/bin/sovl-dither b/.local/bin/sovl-dither
index 61dd212..290420d 100755
--- a/.local/bin/sovl-dither
+++ b/.local/bin/sovl-dither
@@ -1,8 +1,15 @@
#!/bin/sh
+
+#Description: intakes a file and an output location, upscales it, and then adds dithering to it.
+
+#Axioms:
+
+#Dependencies: https://packages.debian.org/sid/imagemagick https://github.com/xinntao/Real-ESRGAN-ncnn-vulkan
+
realesrgan -i "$1" -o "upscaled_$1"
-convert -trim "upscaled_$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "dither_o2x2_upscaled_$1.jpg"
-convert -trim "upscaled_$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "dither_o3x3_upscaled_$1.jpg"
-convert -trim "upscaled_$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "dither_o4x4_upscaled_$1.jpg"
-convert -trim "$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "dither_o2x2_$1.jpg"
-convert -trim "$1" -quantize transparent +dither -colors 64 -ordered-dither o3x3 -channel A -contrast-stretch 10% "dither_o3x3_$1.jpg"
-convert -trim "$1" -quantize transparent +dither -colors 64 -ordered-dither o4x4 -channel A -contrast-stretch 10% "dither_o4x4_$1.jpg"
+convert -trim "upscaled_$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "$2dither_o2x2_upscaled_$1.jpg"
+convert -trim "upscaled_$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "$2dither_o3x3_upscaled_$1.jpg"
+convert -trim "upscaled_$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "$2dither_o4x4_upscaled_$1.jpg"
+convert -trim "$1" -quantize transparent +dither -colors 64 -ordered-dither o2x2 -channel A -contrast-stretch 10% "$2dither_o2x2_$1.jpg"
+convert -trim "$1" -quantize transparent +dither -colors 64 -ordered-dither o3x3 -channel A -contrast-stretch 10% "$2dither_o3x3_$1.jpg"
+convert -trim "$1" -quantize transparent +dither -colors 64 -ordered-dither o4x4 -channel A -contrast-stretch 10% "$2dither_o4x4_$1.jpg"