1
1
Fork 0
mirror of https://github.com/tonydamage/nux-env.git synced 2025-12-11 13:24:28 +01:00

Added extend

This commit is contained in:
Tony Tkáčik 2025-06-23 08:26:17 +02:00
parent e5caf969d4
commit 5dcb3024c4

View file

@ -176,6 +176,19 @@ nux.log debug "FFMPEG: $FFMPEG_OR_LIBAV Magick: $NUX_MAGICK"
done; 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:: <size> <image...> ## list-smaller:: <size> <image...>
## Lists images smaller than **size**. ## Lists images smaller than **size**.
@command list-smaller size { @command list-smaller size {