<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="3" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[3]</anchor-end> 
<dfn><code>Image::XFace</code></dfn>
は、
<code>X-Face</code>
を扱う
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Perlモジュール</anchor>です。</p><section><h1>Image::XFace 0.1 (README)</h1><p>This is a very simple interface to the libcompface library used for encoding
and decoding `X-Face' images used in email headers.</p><p>これはとっても単純な <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">libcompface</anchor> library の界面です。
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">電子メイル</anchor>の頭の <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">X-Face</anchor> 画像の符号化と復号に使います。</p><p>Many versions of libcompface are broken and don't contain the compface
function. This is fine if you don't want to create X-Face data, less so
otherwise. I fixed this in faces-1.6.1 with the following patch:</p><p>多くの版の libcompface は壊れてて compface 関数を含みません。
これは X-Face データをつくりたいと思ってない時はいいですが、
そうじゃないときはね。てことで次のパッチを faces-1.6.1
に当てるとなおります。<insert xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:"><p xmlns="http://www.w3.org/1999/xhtml">訳注: faces の(翻訳時点での)最新版では 1.7.7 ですが、
こいつにはこのパッチは当たりません。</p></insert></p><pre> diff -urN faces-orig/compface/Makefile faces/compface/Makefile
 (略)
 --- patch ends</pre><p>The interface code was written by SWIG, because I am too lazy to write XS
code myself. However, I have modified the results of the SWIG stuff, so you
can't simply re-run it from the interface definition in swig/. In particular,
the version of SWIG I used didn't like to make modules in subdirectories and
I couldn't see a nice way to combine perl and C code in the generated pm file.
So I just cobbled it together manually. </p><p>界面の code は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">SWIG</anchor> で書きました。わたしゃなまくらなもんで
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">XS</anchor> code を自分で書くのはアレゲで。でも、 SWIG の結果を
修正しているから、 swig/ にある界面定義で再実行するだけじゃ
駄目です。とりわけ、私が使った版の SWIG じゃ下位ディレクトリ中に
モジュールをつくれないっぽいし <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">perl</anchor> と <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">C</anchor> の code
を生成された pm file 中でくっつけるいい方法が見つかんなくて。
だからこいつらを手作業でやりました。</p></section><section><h1>Image::XFace 0.1 (pod)</h1><section><h1>NAME</h1><p>Image::XFace - encode and decode `X-Face' 48x48x1 face bitmaps
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">X-Face</anchor> 48×48×1 顔点描図の符号化と復号</p></section><section><h1>SYNOPSIS</h1><pre>    use Image::XFace;</pre><pre>    # obtain $xface data... $xface データを得る
    @bits = Image::XFace::uncompface($xface);
    if (@bits != 48) {
        # data were invalid
    }</pre><pre>    # create xface data  xface データをつくる
    $xface = Image::XFace::compface(@bits);</pre><pre>    # get xface data as an image  xface データを画像として取得
    use GD;
    $img = Image::XFace::uncompface_gd($xface);
    # do with img as you will....  img を煮るなり焼くなり</pre></section><section><h1>DESCRIPTION</h1><p>Simple interface to compressing and uncompressing X-Face header data. For
instance, a small bitmap of me is represented by</p><p><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">X-Face</anchor> 頭データを圧縮・展開する単純な界面です。
例えば、私の小さな点描画はこう表現されます。</p><pre> &quot;kUA_=&amp;I|(by86eXgYc|U}5`O%&lt;xlo,~+JN9uk&quot;Z`A.UCf2\1KKZ
 {FY-IIOqH/IS&quot;=5=cb`U,mDyyf8a6BzVgYT~pRtqze]%s#\(J{/u
 m&quot;(r,Ol^4J*Y%aWe-9`ZKGEYjG}d?#u2jzP,x37.%A~Qa;Yy6Fz`
 i/vu{}?y8%cI)RJpLnW=$yTs=TDM'MGjX`/LDw%p;EK;[ww;9_;U
 nRa+JZYO}[-j]O08X\Nm/K&gt;M(P#,)y`g7N}Boz4b^JTFYHPz:s%i
 dl@t$\Vv$3OL6:&gt;GEGwFHrV$/bfnL=6uO/ggqZfet:&amp;D3Q=9c</pre></section><section><h1>PUBLIC INTERFACE 公開界面</h1><ul><li>uncompface XFACE</li></ul><p>Decode XFACE data. Returns in list context 48 bit-strings of image data as
generated by vec.</p><p>XFACE データを復号します。リスト文脈で <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">vec</anchor> により生成された
48ビット文字列の画像データを返します。</p><ul><li>compface IMAGE</li></ul><p>Encodes binary image data encoded in bit-strings as XFACE data, returning it
in scalar context.</p><p>ビット文字列で符号化されたバイナリ画像データを XFACE データとして
符号化して、<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">スカラー</anchor>文脈でこれを返します。</p><ul><li>uncompface_gd XFACE</li></ul><p>Decode XFACE data into a GD image object.</p><p>XFACE データを <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">GD</anchor> 画像物体に復号します。</p></section><section><h1>AUTHOR</h1><p>Chris Lightfoot &lt;chris@ex-parrot.com&gt;, though all the real work is done by
the compface library of James Ashton.</p></section><section><h1>COPYING</h1><p>Copyright (c) 2002 Chris Lightfoot.</p><p>This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.</p></section><section><h1>VERSION</h1><p>Id: XFace.pm,v 1.1.1.1 2002/02/17 23:09:57 chris Exp </p></section><section><h1>SEE ALSO</h1><p><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">compface</anchor>(3)</p></section></section><section><h1>License</h1><p><code>Image::XFace</code> 付属のドキュメントとその和訳の部分に関しては、
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Perlと同じライセンス</anchor>。</p></section><section><h1>メモ</h1><ul><li>2002-10-16 (Wed) 21:06:34 <em><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor></em> : I::XF は <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">xs</anchor> を使うので要コンパイルです。</li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="1" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[1]</anchor-end> 2002-10-27 (日) 14:30 <em><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor></em>: <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">WindozeMe</anchor> (+ <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Cygwin</anchor> + <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">perl</anchor> 5.8.0) でコンパイルしようとしたけどできませんですた。 Quick hack ではどーにもなりませんですた。</li><li><anchor-end xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:anchor="2" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:">[2]</anchor-end> 2002-10-27 (日) 14:30 <em><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor></em>: それから、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">GNU/Linux</anchor> + perl 5.6.0 でも駄目ですた。困りますた。</li></ul></section></body></html>