全部compose效果图

sh/bash/dash/ksh/zsh等Shell脚本
回复
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

全部compose效果图

#1

帖子 eexpress » 2009-09-04 20:27

代码: 全选

● 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
附件
all-compose-effect.png
all-compose-effect.png
● 鸣学
头像
c\nc
帖子: 231
注册时间: 2007-12-25 12:51

Re: 全部compose效果图

#2

帖子 c\nc » 2009-09-04 20:34

好玩,就是不知道用在哪……
头像
O_O_BOT
帖子: 2461
注册时间: 2009-05-20 19:32

Re: 全部compose效果图

#3

帖子 O_O_BOT » 2009-09-04 20:46

"""$FONT""" 打那么多 无聊
irc 聊天室
ubuntu-cn 的irc 频道为
irc.ubuntu.com 8001 #ubuntu-cn
UTF8编码 可用 irssi xchat pidgin weechat 登录

http://webchat.freenode.net/?channels=ubuntu-cn
[url]irc://irc.freenode.net/ubuntu-cn[/url]
头像
c\nc
帖子: 231
注册时间: 2007-12-25 12:51

Re: 全部compose效果图

#4

帖子 c\nc » 2009-09-04 20:48

O_O_BOT 写了:"""$FONT""" 打那么多 无聊
我一直理解不了,用一对引号能出什么问题。
头像
O_O_BOT
帖子: 2461
注册时间: 2009-05-20 19:32

Re: 全部compose效果图

#5

帖子 O_O_BOT » 2009-09-04 22:26

一对就ok 多了没用
irc 聊天室
ubuntu-cn 的irc 频道为
irc.ubuntu.com 8001 #ubuntu-cn
UTF8编码 可用 irssi xchat pidgin weechat 登录

http://webchat.freenode.net/?channels=ubuntu-cn
[url]irc://irc.freenode.net/ubuntu-cn[/url]
头像
xsoul
帖子: 441
注册时间: 2007-06-05 18:27

Re: 全部compose效果图

#6

帖子 xsoul » 2009-09-05 10:12

果然弄出来了 :em05
mark
头像
eagle5678
帖子: 1865
注册时间: 2006-07-08 14:07

Re: 全部compose效果图

#7

帖子 eagle5678 » 2009-09-05 17:50

ee在干什么
头像
roylez
帖子: 1928
注册时间: 2005-10-04 10:59
来自: 上海

Re: 全部compose效果图

#8

帖子 roylez » 2009-09-05 18:47

我想用这个脚本,以“BT”为参数执行,弄出来的图片送EE。
弄个dropbox空间来备份文件或者做私人代码服务器
配置:[url]git://github.com/roylez/dotfiles.git[/url]
主页:http://roylez.heroku.com
各种稀奇玩意儿:http://dooloo.info
blue sea
帖子: 198
注册时间: 2007-11-10 8:57

Re: 全部compose效果图

#9

帖子 blue sea » 2009-09-05 22:15

玩疯了 :em02
回复