diff options
| author | Craig Jennings <c@cjennings.net> | 2025-10-15 17:44:30 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-10-15 17:44:30 -0500 |
| commit | b88a4f6589bac9d5831692a04f0952ce3300ab0d (patch) | |
| tree | 79809ec5d0a8c8dda48f9f6f4a223266884bca46 /modules | |
| parent | 55a8009d7be688d0ebd77f28837fb4cd38a5f4e8 (diff) | |
add dwim shell command for optimizing for email
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/dwim-shell-config.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/modules/dwim-shell-config.el b/modules/dwim-shell-config.el index a1ace2be..2865dd86 100644 --- a/modules/dwim-shell-config.el +++ b/modules/dwim-shell-config.el @@ -713,11 +713,17 @@ Supports docx, odt, and other pandoc-compatible formats." (cj/xdg-open output-file) (message "Opened %s" output-file))))))) - +(defun cj/dwim-shell-commands-optimize-image-for-email () + "Optimize image(s) for email - reduces file size while maintaining quality. +Resizes to max 1200px (only if larger), strips metadata, and applies JPEG optimization." + (interactive) + (dwim-shell-command-on-marked-files + "Optimize for email" + "magick '<<f>>' -strip -resize '1200x1200>' -quality 85 -interlace Plane -colorspace sRGB -sampling-factor 4:2:0 '<<fne>>_email.<<e>>'" + :utils "magick")) (defun cj/dwim-shell-commands-kill-gpg-agent () "Kill (thus restart) gpg agent. - Useful for when you get this error: gpg: public key decryption failed: No pinentry gpg: decryption failed: No pinentry" |
