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:
parent
e5caf969d4
commit
5dcb3024c4
1 changed files with 13 additions and 0 deletions
13
bin/medie
13
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:: <size> <image...>
|
||||
## Lists images smaller than **size**.
|
||||
@command list-smaller size {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue