<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><p><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">電子メイル</anchor>や<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">電子ニュース</anchor>の記事で、身元識別など(謎)
の目的で頭領域につける画像。</p><p>元々は48×48点の白黒画像1つを compface というプログラムで
<anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">ASCII</anchor> printable character にしたものでしたが、
現在では多色, 他の大きさ, 動画などを扱えるように拡張されています。</p><section><h1>多階調 X-Face</h1><p>多階調 X-Face と depth について:</p><blockquote><p>2 から 8 の間の数字です。これがそのまま X-Face ヘッダーの</p><p>数になるのですが、まあ 3 か多くても 4 で何とか絵になると思います。</p></blockquote><blockquote><p>普通の X-Face は各画素を 0 か 1 の二値で表現した 2304 ビットのデー</p><p>タを、compface で非破壊圧縮して作っているのはご存知の通りです。</p></blockquote><blockquote><p>では多階調 X-Face はどうやっているかというと、例えば X-Face ヘッ</p><p>ダーが 3個ある場合は一つの画素を 3 ビットで表現し、000 から 111</p><p>までの 8 段階の明るさを表現できるようにしています。各画素の 3 ビッ</p><p>トのうち最上位ビットだけを集めて作ったのが X-Face:、真ん中のビッ</p><p>トだけを集めて作ったのが X-Face-1:、最下位ビットだけを集めて作っ</p><p>たのが X-Face-2: という具合になっています。</p></blockquote><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:"><anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="mid:yosur8mw4x7s.fsf@jpl.org" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI">mid:yosur8mw4x7s.fsf@jpl.org</anchor-external> (wl:09609) から引用</comment-p><comment-p xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:10:">多階調 X-Face の document ってあるんだろうか?
謎だから x-face.el 読んで実装すべし。</comment-p></section><section><h1>カラー/マルチ X-Face (aka RGB X-Face)</h1><p><anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.jpl.org/elips/" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI">http://www.jpl.org/elips/</anchor-external> から入手できる
x-face package の METHOD.ja より引用</p><section><h1>4. カラー/マルチ X-Face</h1><pre>  マルチ X-Face とは、サイズが 48x48 の普通の X-Face を複数個組み合わ
  せて一枚の絵にするもので、カラー X-Face もその一種です。</pre><pre>  さて、互いに無関係な複数の、それぞれのサイズが 48x48 の絵をエンコー
  ドしてヘッダに挿入した場合、それらをデコードして表示する場合の順序や
  配置はさほど問題になりません。しかし、もっと大きな絵を複数の X-Face
  に分割したりカラーの絵を２値の三原色に分解して伝送する場合には、それ
  ぞれをデコードした後でつなぎあわせたり合成するときの順序や配置に関す
  る情報を一緒に伝送する必要があります。そのため</pre><pre>  X-Face-Type:</pre><pre>  というフィールドを創設しました。この右側には &quot;;&quot; で区切って ascii 文
  字で複数の情報を並べることができ、並べる順序の決まりや大文字/小文字
  の区別はありません。現在以下の二つが予約されています。</pre><pre>  geometry=MxN
    M と N はそれぞれ M=横幅÷48, N=高さ÷48 で求められる自然数で、こ
    れによって表示するときのサイズを表します。</pre><pre>  RGB
    ２値の三原色に分解したカラー X-Face であることを示します。当然なが
    ら３の自然数倍の個数の X-Face フィールドがヘッダに含まれていなけれ
    ばなりません。これには必ず geometry の指定が伴っている必要があり、
    カラーイメージとして表示するときのサイズを表します。</pre><pre>  ;;; 他にプログラムの開発段階を表す status という要素を一時使ったこと
  ;;; がありますが、これはあえて予約語にはしないことにします。</pre><pre>  互いに無関係な複数または単一の X-Face フィールドをヘッダに挿入すると
  きは X-Face-Type フィールドを付ける必要はありません。これが必要なの
  は 48x48 より大きいものやカラー X-Face を伝送する場合で、必ず X-Face
  フィールドより前に挿入します。続く複数の X-Face フィールドは、以下の
  ような順序で並べます。これらの組合せ (例えば 2x1 のカラーと 1x3 のモ
  ノクロ X-Face、都合 9個の X-Face フィールドをヘッダに挿入する) も可
  です。</pre><pre>  X-Face-Type: geometry=3x1
  X-Face: (1)                   +---+---+---+
  X-Face: (2)                   | 1 | 2 | 3 |
  X-Face: (3)                   +---+---+---+</pre><pre>                                +---+
  X-Face-Type: geometry=1x3     | 1 |
  X-Face: (1)                   +---+
  X-Face: (2)                   | 2 |
  X-Face: (3)                   +---+
                                | 3 |
                                +---+</pre><pre>  X-Face-Type: geometry=3x2
  X-Face: (1)                   +---+---+---+
  X-Face: (2)                   | 1 | 2 | 3 |
  X-Face: (3)                   +---+---+---+
  X-Face: (4)                   | 4 | 5 | 6 |
  X-Face: (5)                   +---+---+---+
  X-Face: (6)</pre><pre>  X-Face-Type: RGB; geometry=1x1    +---+
  X-Face: (1 Red)                   | 1 |
  X-Face: (1 Green)                 +---+
  X-Face: (1 Blue)</pre><pre>  X-Face-Type: RGB; geometry=2x1
  X-Face: (1 Red)
  X-Face: (2 Red)                 +---+---+
  X-Face: (1 Green)               | 1 | 2 |
  X-Face: (2 Green)               +---+---+
  X-Face: (1 Blue)
  X-Face: (2 Blue)</pre><pre>  X-Face-Type: RGB; geometry=1x2
  X-Face: (1 Red)                   +---+
  X-Face: (2 Red)                   | 1 |
  X-Face: (1 Green)                 +---+
  X-Face: (2 Green)                 | 2 |
  X-Face: (1 Blue)                  +---+
  X-Face: (2 Blue)</pre><pre>  X-Face-Type: RGB; geometry=2x2
  X-Face: (1 Red)
  X-Face: (2 Red)
  X-Face: (3 Red)                 +---+---+
  X-Face: (4 Red)                 | 1 | 2 |
  X-Face: (1 Green)               +---+---+
  X-Face: (2 Green)               | 3 | 4 |
  X-Face: (3 Green)               +---+---+
  X-Face: (4 Green)
  X-Face: (1 Blue)
  X-Face: (2 Blue)
  X-Face: (3 Blue)
  X-Face: (4 Blue)</pre><pre>  これらの並びの順序は重要で、途中に別のフィールドが紛れ込むのは構いま
  せんが、 X-Face や X-Face-Type の順序が変わってしまうと元の絵を再現
  することができません。現在までのところ順序を入れ替えてしまう MUA/MTA
  に遭遇したことはありませんが、フィールドの並び順 (特に X- で始まるも
  の) に関する決まりは無いので、不幸にして壊れてしまったら諦めるしかあ
  りません。(;_;)</pre><p>(引用ここまで)</p></section></section><section><h1>動画 (animated) X-Face</h1></section><section><h1>X-Face に関連する領域</h1><ul><li>X-Face:領域</li><li>X-Face-数字:領域</li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">X-Face-Type:領域</anchor></li><li>X-Face-Version: 領域</li></ul><section><h1>X-Face-Version: 領域</h1><p>X-Face を出力したソフトウェアなどについての情報を入れる
非構造化頭領域。</p></section></section><section><h1>SEE ALSO</h1><ul><li><anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.jpl.org/elips/" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI">http://www.jpl.org/elips/</anchor-external></li><li><anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.find.co.jp/~saku/dface.html" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI">http://www.find.co.jp/~saku/dface.html</anchor-external></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">電子メイル</anchor></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">電子ニュース</anchor></li><li><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">RFC822と仲間達の頭領域名</anchor></li></ul><ul><li>2002-10-16 (Wed) 20:36:48 <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:">perl</anchor> で扱うには、 <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">CPAN</anchor> に <anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">Image::XFace</anchor> というモジュールがありました。 (まだ試してみてません。)</li><li>2002-10-16 (Wed) 20:55:44 <em><anchor xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:">名無しさん</anchor></em> : I::XF については <anchor-external xmlns="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resParameter="http://www.ex-parrot.com/~chris/software.html" xmlns:a0="urn:x-suika-fam-cx:markup:suikawiki:0:9:" a0:resScheme="URI">http://www.ex-parrot.com/~chris/software.html</anchor-external> 参照</li></ul></section></body></html>