📄 procimage
字号:
# Set up the defaultswidth=1colour='-color grey'usage="Usage: $0 [-s N] [-w N] [-c S] imagefile..."# Initialise the pipeline componentsstandardise=' | ppmquant -quiet 256 | ppmtogif -quiet'while getopts ":s:w:c:" opt; do case $opt in s ) size=$OPTARG scale=' | pnmscale -quiet -xysize $size $size' ;; w ) width=$OPTARG border=' | pnmmargin $colour $width' ;; c ) colour="-color $OPTARG" border=' | pnmmargin $colour $width' ;; \? ) echo $usage exit 1 ;; esacdoneshift $(($OPTIND - 1))if [ -z "$@" ]; then echo $usage exit 1fi# Process the input filesfor filename in "$@"; do case $filename in *.gif ) convert=giftopnm ;; *.tga ) convert=tgatoppm ;; *.xpm ) convert=xpmtoppm ;; *.pcx ) convert=pcxtoppm ;; *.tif ) convert=tifftopnm ;; *.jpg ) convert=djpeg ;; * ) echo "$0: Unknown filetype '${filename##*.}'" exit 1;; esac outfile=${filename%.*}.new.gif eval $convert $filename $scale $border $standardise > $outfiledone
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -