我的处理照片脚本
以前写的一个处理相片的脚本,使用imagemagick 把数码相机里的照片转成1024宽的图片,同时在照片上添加一个水印,内容是从EXIF中取出的拍摄时间。 #!/bin/sh # File: deal_photo.sh # Description: # 把数码相机里的照片转成1024宽的图片 # 同时在照片上添加一个水印,内容是从EXIF中取出的拍摄时间 # Created: 2009-11-02 10:01:11 # Last modified: 2009-11-02 10:01:11 set -x for i in *.JPG;do out=`echo _$i|sed 's/JPG$/jpg/'` time=`identify -format "%[EXIF:DateTime]" $i` title="notsobad at $time" [ -f $out ] && rm $out; convert -gravity south\ -size 1024x \ +profile "*" \ -fill green \ -pointsize 30\ -font /home/wang/.fonts/MONACO.TTF \ -draw "text 10,10 '$title'" \ $i $out done