Wireless Application Protocol Bitmap Format

Wireless Application Protocol Bitmap Format(Wireless Bitmap と略記される)とは、モノクロームの画像ファイルフォーマットであり�…

Wireless Bitmap
拡張子 .wbmp
MIMEタイプ image/vnd.wap.wbmp
開発者 WAP Forum
種別 画像ファイルフォーマット
テンプレートを表示

Wireless Application Protocol Bitmap FormatWireless Bitmap と略記される)とは、モノクローム画像ファイルフォーマットであり、携帯機器向けに最適化されている。ファイル拡張子は .wbmp であり、WBMP と記されることもある。

WBMP 画像はモノクロ(黒と白)であり、ファイルサイズは小さい。黒いピクセルを 0、白いピクセルを 1 で表す。

WAPでは、カラー画像としてはGIFJPEGPNGなどの形式をサポートしている[1]

Wireless Bitmap ファイルのフォーマット

フィールド名 フィールド型 サイズ(バイト) 用途
Type uintvar 可変 画像のタイプ。0 の場合、モノクロのビットマップを意味する。
Fixed header byte 1 予約されている。常に 0。
Width uintvar 可変 画像の幅をピクセル数で表したもの。
Height uintvar 可変 画像の高さをピクセル数で表したもの。
Data byte array 可変 画像データをライン単位に並べたもの。1ビットが1ピクセルに対応する。黒いピクセルは 0、白いピクセルは 1。ラインの幅が8で割り切れない場合、バイト境界まで 0 を補う。

なお、unitvar とは、ビット列を7ビットずつに分割し、最後尾の7ビットだけは最上位ビットを 0、それ以外は最上位ビットを 1 としたバイト列にすることで、可変長整数を表す形式である。

具体例

以下の例では、b = 黒、w = 白を意味する。

行1 - bwb
行2 - wbw
行3 - bwb

というビットマップを WBMP で表すと、次のようになる。

オクテット 1: 00000000 (WBMP type)
オクテット 2: 00000000 (Fixed header)
オクテット 3: 00000011 (Width) = 3
オクテット 4: 00000011 (Height) = 3

オクテット 5-7: 各行が 3 ビットなので、5ビットずつパディングする。

 
オクテット 5: 010 00000 (行1)
オクテット 6: 101 00000 (行2)
オクテット 7: 010 00000 (行3)

脚注

外部リンク

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.