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
.
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. |
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
.
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
bit-depth
= 8palette
= predefined palette "System - Mac"bytes-per-image-row
=W
(add 1 ifW
is odd, so that every row is an even number of bytes)
and use the width W
and height H
given by the header data.