These pages are written by only Japanese.

Welcom to My Diary.com
最新の日記タイトル一覧カテゴリ別タイトル一覧トップへ戻る〜

こんばんわ♪ 現在は4月28日(日)4時17分。 静寂が闇を包む頃です。


hns - 日記自動生成システム - Version 2.19.5 (色々 Fixed)

先月 2010年03月 来月
1 2 3 4 05 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
Namazu for hns による簡易全文検索です。
詳細は 詳細指定/ヘルプをご参照下さい。
検索式:

2010年03月10日(水)

giftrans インストール

透過GIFが作りたくなったので、giftrans を導入。

download:

% wget http://www.int.gu.edu.au/~anthony/software/giftrans_v1.12.3.c

build:

% gcc -O3 giftrans_v1.12.3.c -o giftrans

install:

% su
Password:
# ls /usr/lib/X11/.
# cp rgb.txt /usr/lib/X11/.
# cp giftrans /usr/local/bin/giftrans

usage:

% giftrans
Usage: giftrans [-t color|-T] [-B color] [-b color] [-g oldcolor=newcolor] [-c comment|-C] [-l|-L|-V] [-o filename] [-e filename] [filename]
Convert any GIF file into a GIF89a, with the folloing changes possible:
-t Specify the transparent color
-T Index of the transparent color is the background color index
-B Specify the transparent color's new value
-b Specify the background color
-g Change a color in the global color table
-c Add a comment
-C Remove old comment
-l Only list the color table
-L Verbose output of GIFs contents
-V Verbose output while converting
-o Redirect stdout to a file
-e Redirect stderr to a file
Colors may be specified as index, as rgb.txt entry or in the #rrggbb form.

test:

giftrans -t "#fcea33"  kuriboo.gif >  kuriboo-trans.gif

周りの黄色は微妙に統一されていなくて、透明になってるのは一部のみ。

todo:

-a オプションをつける
giftrans -a kuriboo.alpha  kuriboo.gif >  kuriboo-trans.gif
みたいな事がしたい。
と思ったら、昔作ってた。さすが自分… 元から透過GIFフォーマットのファイルに対して、 任意のピクセルを透明にするのと、256色全部使っている画像ではない。 という前提があって、いまいち。
でも、GIF は透明色を含めて256色なので、 透明色無しで256色使うGIFに透明色を追加しようとすると、 透明以外の色を255色以内に収める減色処理が必要になるので、ちょっと面倒。
まぁ、誰かに欲しいって言われたら頑張ろっと。

これで、1 日分だよ〜。

タイトル一覧
カテゴリ分類
Database
JXTA
Java
XML
awm
bookmark
keyword
memo
news
research
Powered by hns-2.19.5, HyperNikkiSystem Project