aboutsummaryrefslogtreecommitdiffstats
path: root/executables/bin
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2025-08-17 10:47:51 -0400
committerEugene Triguba <hello@eugenetriguba.com>2025-08-17 10:47:51 -0400
commit93ea8352a041f72d7ab4bdf9f8784aa19483ce64 (patch)
treead67424ab4c490de3047a00eefd70e222ec990c8 /executables/bin
parentAdjust tmux config to create new windows in same dir and use toggle term (diff)
downloaddotfiles-93ea8352a041f72d7ab4bdf9f8784aa19483ce64.zip
Add optimize image script
Diffstat (limited to 'executables/bin')
-rwxr-xr-xexecutables/bin/optimize-image21
1 files changed, 21 insertions, 0 deletions
diff --git a/executables/bin/optimize-image b/executables/bin/optimize-image
new file mode 100755
index 0000000..c3de480
--- /dev/null
+++ b/executables/bin/optimize-image
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+main() {
+ source_img_path="$1"
+ if [ -z "$source_img_path" ]; then
+ print_usage
+ exit 1
+ fi
+ result_img_path="$2"
+ if [ -z "$result_img_path" ]; then
+ result_img_path="$source_img_path"
+ fi
+
+ magick "$source_img_path" -strip -interlace Plane -gaussian-blur 0.05 -quality 85% "$result_img_path"
+}
+
+print_usage() {
+ echo "Usage: $0 <source-img-path> [result-img-path]"
+}
+
+main "$@"