add:media
This commit is contained in:
13
media/webpconvert.sh
Executable file
13
media/webpconvert.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
# TODO add resource options like ogcard, yt-thumbnail, etc
|
||||
# convert to golang or rust probably for better ux on cli
|
||||
DEFAULT_WIDTH=1200
|
||||
|
||||
if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then
|
||||
echo "Usage: $0 <input> <output> [width]"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
WIDTH="${3:-$DEFAULT_WIDTH}"
|
||||
|
||||
magick "$1" -resize "${WIDTH}x>" -quality 85 "$2"
|
||||
Reference in New Issue
Block a user