TITLE:Flash SWF format - Lossless

* 可逆圧縮の画像データを保存するタグ [#eea56a0f]
* 例えば細かい模様等は JPEG だとぼやけて困る [#b309022b]

*** (20) DefineBitsLossless [#tag20]

- フォーマットによってパレット形式とビットマップ形式がある

-- 共通部分
 +--------------------------------------------------------------------+---
 | tag | length |   length   |  image_id | format |  width  |  height | ...
 |  6  |  0x3f  |            |           |        |         |         |
 +--------------------------------------------------------------------+---
 <-- 2 bytes --><- 4 bytes -><-2 bytes-><-1 byte-><-2 bytes-><-2 bytes->
                               <------------------  length ---(最後まで)
-- format 3 (GIF のようなパレット形式)

                     ↓RGBの順で並ぶ
 -----------------------------------------------------+
 ...|colormap_count|   colormap   |      indices      |
 -----------------------------------------------------+
     <-- 2 bytes -><-- colormap --><- width * height ->
                       count * 3
-- format 4
 見た事ないので省略

-- format 5 (PNG のようなビットマップ形式)

      ↓XRGBの順で並ぶ (X は padding)
 ---------------------------+
 ...|         bitmap        |
 ---------------------------+
     <- width * height * 4 ->

*** (36) DefineBitsLossless2 [#tag36]

- DefineBitsLossless2 に透明度がついたもの。

-- 共通部分 (DefineBitsLossless と同じ)
 +--------------------------------------------------------------------+---
 | tag | length |   length   |  image_id | format |  width  |  height | ...
 |  6  |  0x3f  |            |           |        |         |         |
 +--------------------------------------------------------------------+---
 <-- 2 bytes --><- 4 bytes -><-2 bytes-><-1 byte-><-2 bytes-><-2 bytes->
                               <------------------  length ---(最後まで)
-- format 3 (GIF のようなパレット形式)

                    ↓ARGBの順で並ぶ
 ------------------------------------------------------+
 ...|colormap_count|    colormap   |      indices      |
 ------------------------------------------------------+
     <-- 2 bytes -><-- colormap --><- width * height ->
                       count * 4
-- format 4
 見た事ないので省略

-- format 5 (PNG のようなビットマップ形式)


        ↓ ← RGB の順で並ぶ
 ---------------------------+
 ...|         bitmap        |
 ---------------------------+
     <- width * height * 4 ->

Reload   Diff   Front page List of pages Search Recent changes Backup Referer   Help   RSS of recent changes