mirror of
https://github.com/tonydamage/nux-env.git
synced 2025-12-11 13:24:28 +01:00
Medie: added split image tasks
This commit is contained in:
parent
82b0df6549
commit
e2b160d7c9
1 changed files with 14 additions and 0 deletions
14
bin/medie
14
bin/medie
|
|
@ -111,6 +111,20 @@ nux.log debug "FFMPEG: $FFMPEG_OR_LIBAV Magick: $NUX_MAGICK"
|
||||||
nux.fs.info "$output" "Created"
|
nux.fs.info "$output" "Created"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@command split-horizontally image {
|
||||||
|
suffix=${image##*.}
|
||||||
|
basename=${image%.*}
|
||||||
|
$NUX_MAGICK convert "$image" -gravity east -chop 50%x0% "$basename.1.$suffix"
|
||||||
|
$NUX_MAGICK convert "$image" -gravity west -chop 50%x0% "$basename.2.$suffix"
|
||||||
|
}
|
||||||
|
|
||||||
|
@command split-vertically image {
|
||||||
|
suffix=${image##*.}
|
||||||
|
basename=${image%.*}
|
||||||
|
$NUX_MAGICK convert "$image" -gravity north -chop 0%x50% "$basename.1.$suffix"
|
||||||
|
$NUX_MAGICK convert "$image" -gravity south -chop 0%x50% "$basename.2.$suffix"
|
||||||
|
}
|
||||||
|
|
||||||
## 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 {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue