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 {