分页: 1 / 1

全部compose效果图

发表于 : 2009-09-04 20:27
eexpress

代码: 全选

● cat test-compose.bash 
#!/bin/bash

[ -z $1 ] && exit
cd /tmp/
rm *.png

INPUT=0001.png
COLOR=black
COLOR_COMPOSE=red
SIZE=80
FONT='/home/exp/安装/备份/●可用字体/英文字体/AMERSN__.ttf'

convert -background none -fill $COLOR -font """$FONT""" -pointsize $SIZE label:$1 $INPUT 

for effect in clear src dst src-over dst-over src-in dst-in src-out dst-out src-atop dst-atop multiply screen overlay darken lighten linear-light color-dodge color-burn hard-light soft-light plus add minus subtract difference exclusion xor
do

convert $INPUT -matte \
        \( +clone -channel A -separate +channel -negate \
           -bordercolor black -border 5  -blur 0x2 -shade 120x30 \
           -normalize -blur 0x1  -fill $COLOR_COMPOSE -tint 100 \) \
        -gravity center -compose $effect -composite \
        $effect.png

done

montage -label %f -pointsize 20 -font $FONT -background none -fill red -geometry +4+4 -tile 6 *.png ~/all-compose-effect.png

Re: 全部compose效果图

发表于 : 2009-09-04 20:34
c\nc
好玩,就是不知道用在哪……

Re: 全部compose效果图

发表于 : 2009-09-04 20:46
O_O_BOT
"""$FONT""" 打那么多 无聊

Re: 全部compose效果图

发表于 : 2009-09-04 20:48
c\nc
O_O_BOT 写了:"""$FONT""" 打那么多 无聊
我一直理解不了,用一对引号能出什么问题。

Re: 全部compose效果图

发表于 : 2009-09-04 22:26
O_O_BOT
一对就ok 多了没用

Re: 全部compose效果图

发表于 : 2009-09-05 10:12
xsoul
果然弄出来了 :em05
mark

Re: 全部compose效果图

发表于 : 2009-09-05 17:50
eagle5678
ee在干什么

Re: 全部compose效果图

发表于 : 2009-09-05 18:47
roylez
我想用这个脚本,以“BT”为参数执行,弄出来的图片送EE。

Re: 全部compose效果图

发表于 : 2009-09-05 22:15
blue sea
玩疯了 :em02