diff options
| author | Eugene Triguba <hello@eugenetriguba.com> | 2025-08-17 10:47:51 -0400 |
|---|---|---|
| committer | Eugene Triguba <hello@eugenetriguba.com> | 2025-08-17 10:47:51 -0400 |
| commit | 93ea8352a041f72d7ab4bdf9f8784aa19483ce64 (patch) | |
| tree | ad67424ab4c490de3047a00eefd70e222ec990c8 /executables | |
| parent | Adjust tmux config to create new windows in same dir and use toggle term (diff) | |
| download | dotfiles-93ea8352a041f72d7ab4bdf9f8784aa19483ce64.zip | |
Add optimize image script
Diffstat (limited to 'executables')
| -rwxr-xr-x | executables/bin/optimize-image | 21 |
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 "$@" |