2008-05-31
2008-04-26
imagemagick: examples (ZZ)
# imagemagick 实用例子
identify -verbose sample.png % display info abound an image
identify -format "%wx%h" sample.png
identify –list color % list all legal color names
identify(convert) -list delegate % list all delegates
convert -size 50x50 xc:black -fill white -draw 'circle 25,25 20,10' shade_circle_mask.gif % create an image
convert -debug input.png output.jpg % display excution details
convert +debug input.png output.jpg % disable all debugging output
convert -verbose input.png output.jpg % be verbose
convert -rotate 90 input.jpg output.jpg % image rotation
convert -charcoal 2 input.jpg output.jpg % charcoal
convert -colorize 255 input.jpg output.jpg % colorize
convert -implode 4 input.jpg output.jpg % implode
convert -solarize 42 input.jpg output.jpg % solarize
convert -spread 5 input.jpg output.jpg % spread
convert -sample 25%x25% -spread 4 \ -charcoal 4 input.jpg output.jpg % chain several commands
convert -resize 42x148 input.jpg output.jpg % resizing
convert -resize 12.5% input.jpg output.jpg
convert -resize 640x480> input.jpg output.jpg % image not less than 640x480
convert -resample 300x300 input.tif output.tif
convert -sample 400% -filter lanczos input.jpf output.jpg
% creates an output file 4times greater than input and uses the Lanczos filter to guess the new pixel values.
convert -thumbnail input.jpg output.jpg % thumnail ignore image profile
convert -crop 1104x372+58+100 input.jpg output.jpg
convert -trim input.jpg output.jpg % trimming, can remove border
convert -fuzz 20% -trim input.jpg output.jpg %
convert -shave 20x20 input.jpg output.jpg % same effect as trim, but with exact size in mind
convert img1trim.jpg img2trim.jpg -fx 'u | v' result.jpg % pixelwise logical operation
convert -quality 10% input.jpg output.jpg % compression
convert -delay 100 frames-*.jpg output.mpg % make an animation from several jpg images
convert -morph 1,2 one.png two.png output-%d.png % morph
mogrify -thumbnail 10% *.jpg % !!!! carefull, mogrify overrides original images
convert -font helvetica -fill white -pointsize 36 -draw 'text 10,50 "Floriade 2002, Canberra, Australia"' floriade.jpg comment.jpg % add a annotation
identify -verbose sample.png % display info abound an image
identify -format "%wx%h" sample.png
identify –list color % list all legal color names
identify(convert) -list delegate % list all delegates
convert -size 50x50 xc:black -fill white -draw 'circle 25,25 20,10' shade_circle_mask.gif % create an image
convert -debug input.png output.jpg % display excution details
convert +debug input.png output.jpg % disable all debugging output
convert -verbose input.png output.jpg % be verbose
convert -rotate 90 input.jpg output.jpg % image rotation
convert -charcoal 2 input.jpg output.jpg % charcoal
convert -colorize 255 input.jpg output.jpg % colorize
convert -implode 4 input.jpg output.jpg % implode
convert -solarize 42 input.jpg output.jpg % solarize
convert -spread 5 input.jpg output.jpg % spread
convert -sample 25%x25% -spread 4 \ -charcoal 4 input.jpg output.jpg % chain several commands
convert -resize 42x148 input.jpg output.jpg % resizing
convert -resize 12.5% input.jpg output.jpg
convert -resize 640x480> input.jpg output.jpg % image not less than 640x480
convert -resample 300x300 input.tif output.tif
convert -sample 400% -filter lanczos input.jpf output.jpg
% creates an output file 4times greater than input and uses the Lanczos filter to guess the new pixel values.
convert -thumbnail input.jpg output.jpg % thumnail ignore image profile
convert -crop 1104x372+58+100 input.jpg output.jpg
convert -trim input.jpg output.jpg % trimming, can remove border
convert -fuzz 20% -trim input.jpg output.jpg %
convert -shave 20x20 input.jpg output.jpg % same effect as trim, but with exact size in mind
convert img1trim.jpg img2trim.jpg -fx 'u | v' result.jpg % pixelwise logical operation
convert -quality 10% input.jpg output.jpg % compression
convert -delay 100 frames-*.jpg output.mpg % make an animation from several jpg images
convert -morph 1,2 one.png two.png output-%d.png % morph
mogrify -thumbnail 10% *.jpg % !!!! carefull, mogrify overrides original images
convert -font helvetica -fill white -pointsize 36 -draw 'text 10,50 "Floriade 2002, Canberra, Australia"' floriade.jpg comment.jpg % add a annotation
2008-04-24
Stardict installation
# Dictionary
http://stardict.sourceforge.net/Dictionaries_zh_CN.php
# install
for file in *.tar.bz2; do
tar xjf $file
done
su
mkdir /usr/share/stardict/dic
# shopt -s extglob
mv !(*.tar.bz2) /usr/share/stardict/dic/.
# ReciteWord
http://reciteword.sourceforge.net/
http://stardict.sourceforge.net/Dictionaries_zh_CN.php
# install
for file in *.tar.bz2; do
tar xjf $file
done
su
mkdir /usr/share/stardict/dic
# shopt -s extglob
mv !(*.tar.bz2) /usr/share/stardict/dic/.
# ReciteWord
http://reciteword.sourceforge.net/
2008-04-21
LaTeX: 参考文献引用 [2-5], or [2] - [5]方法 (ZZ)
发信人: scl (Hello, friends), 信区: TeX
标 题: 参考文献引用 [2-5], or [2] - [5]方法
发信站: 水木社区 (Sun Sep 17 06:40:15 2006), 站内
别笑偶,偶也是刚刚知道怎么用,估计还有些同学不知道,写出来希望对大家有点用。这个方法对我有用,不知道是否是通用的,我不懂这些语法,如果不对请大家指点一下,谢谢。
如果只需要象[2-5], 很简单,用\usepakage{cite}就可以了,不行的话,请去download最新的cite.sty文件。
如果要象[2] - [5],除了用\usepakage{cite}外,再加下面一段:
\def\@citex[#1]#2{%
\let\@citea\@empty
\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{], [}%
\edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
\G@refundefinedtrue
\@latex@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
\def\citepunct{], [}
\def\citedash{]--[}
我是放在.cls文件里用的,不知道放在别的地方行不行。还有,上面的#1, #2啥的不知道会有什么问题(别笑偶,真的不知道,没有去学LaTex语法)
--
Life is happy~~
※ 来源:·水木社区 http://newsmth.net·[FROM: 128.194.79.*]
标 题: 参考文献引用 [2-5], or [2] - [5]方法
发信站: 水木社区 (Sun Sep 17 06:40:15 2006), 站内
别笑偶,偶也是刚刚知道怎么用,估计还有些同学不知道,写出来希望对大家有点用。这个方法对我有用,不知道是否是通用的,我不懂这些语法,如果不对请大家指点一下,谢谢。
如果只需要象[2-5], 很简单,用\usepakage{cite}就可以了,不行的话,请去download最新的cite.sty文件。
如果要象[2] - [5],除了用\usepakage{cite}外,再加下面一段:
\def\@citex[#1]#2{%
\let\@citea\@empty
\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{], [}%
\edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
\G@refundefinedtrue
\@latex@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{\hbox{\csname b@\@citeb\endcsname}}}}{#1}}
\def\citepunct{], [}
\def\citedash{]--[}
我是放在.cls文件里用的,不知道放在别的地方行不行。还有,上面的#1, #2啥的不知道会有什么问题(别笑偶,真的不知道,没有去学LaTex语法)
--
Life is happy~~
※ 来源:·水木社区 http://newsmth.net·[FROM: 128.194.79.*]
Subscribe to:
Posts (Atom)