Skip to content

Latest commit

 

History

History
46 lines (31 loc) · 1.84 KB

File metadata and controls

46 lines (31 loc) · 1.84 KB

Thumbnail (THUM)

A thumbnail can belong to a bitmap cast member and is a downscaled version of the image used in the cast windows and property explorer in Director. A thumbnail for a bitmap seems to be created once the size of the bitmap is larger than 2500 pixels.

TODO: CAN belong? Doesn't it always belong?

The FourCC of the chunk is THUM.

Structure

The thumbnail chunk is saved in big-endian.

The structure is described by:

Ref. Bytes Type Description
HL 4 uint32 Header length
  HL   Chunk header
DL 4 uint32 Image data length
  DL   Raw image data for the thumbnail.

Chunk header

The structure of the chunk header is:

Ref. Bytes Type Name Description
  2 int16 top y-value of the top of the image bounding box rectangle.
  2 int16 left x-value of the left side of the image bounding box rectangle.
  2 int16 bottom y-value of the bottom side of the image bounding box rectangle.
  2 int16 right x-value of the right side of the image bounding box rectangle.

We can construct the width W as right - left and the height H as bottom - top.

Unpacking the image data

The image data in a thumbnail is basically just the same data as in a bitmap data chunk. We can parse it in the same way if we set

and use the width W and height H given by the header data.