pbmpaste

機能

pbmファイルをpbmファイルに張り付ける

起動方法

     pbmpaste   [-replace|-or|-and|-xor] frompbmfile x y [intopbmfile]

説明

入力(frompnmfile)としてppm,pgm,pbmファイルを読み込んで、intopnmfileの 左上からx,yの位置に張り付ける。intopnmfileが指定されていない場合は intopnmfileは標準入力から読み込まれる。
x + frompnmfileの横方向の解像度
y + frompnmfileの縦方向の解像度
がintopnmfileの横、縦の解像度より大きいとエラーになる。
x,yがマイナスの値の時もエラーになる。
このコマンドは大きな画像ファイルがあった時、その一部だけを取り出して 取り出した部分を修正し、またもとに戻したりする時に使用できる。

パラメータの説明

-replace
frompbmfileの値でintopbmfileの値を置き換える。 (デフォールト)
-or
frompbmfileの値とintopbmfileの値の論理和をとる。
-and
frompbmfileの値とintopbmfileの値の論理積をとる。
-xor
frompbmfileの値とintopbmfileの値の排他積をとる。

tmp1.pbmとtmp2.pbmを使って次のようにコマンドを打ち込むと

以下のようになる。

pbmpaste -replace tmp1.pbm 10 10 tmp2.pbm > replace.pbm
replace.gif
pbmpaste -or tmp1.pbm 10 10 tmp2.pbm > or.pbm
or.pbm
pbmpaste -and tmp1.pbm 10 10 tmp2.pbm > and.pbm
and.pbm
pbmpaste -xor tmp1.pbm 10 10 tmp2.pbm > xor.pbm
xor.pbm

参照

プログラマー/バージョン

     Copyright (C) 1989 by Jef Poskanzer.

     Permission  to  use,  copy,  modify,  and  distribute   this
     software  and  its documentation for any purpose and without
     fee is hereby granted, provided  that  the  above  copyright
     notice  appear  in  all  copies and that both that copyright
     notice and this permission notice appear in supporting docu-
     mentation.   This  software  is  provided  "as  is"  without
     express or implied warranty.

Home | Contents
abe@injapan.net