From 5dcb3024c4f501a2580f8b88193ad8769e6cac35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tony=20Tk=C3=A1=C4=8Dik?= Date: Mon, 23 Jun 2025 08:26:17 +0200 Subject: [PATCH] Added extend --- bin/medie | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bin/medie b/bin/medie index ee7f36f..889bd73 100755 --- a/bin/medie +++ b/bin/medie @@ -176,6 +176,19 @@ nux.log debug "FFMPEG: $FFMPEG_OR_LIBAV Magick: $NUX_MAGICK" done; } +@command expand aspect gravity color { + aspect_suffix=${aspect/:/_} + for image in "$@"; do + target="$(target.from "$image" "$aspect_suffix")"; + #nux.fs.info "$image": Target image: "$target" + gm convert $image -background $color -gravity $gravity -extent $aspect $target + nux.fs.info "$target" "Image cropped to aspect ratio: $aspect" + done; +} + + + + ## list-smaller:: ## Lists images smaller than **size**. @command list-smaller size {