Matte file
 
 
 

Platforms

Windows

Description

Alias matte files are a variant of Alias pix files. This file format has been deprecated, and is no longer created by the software.

bytes header value notes
0, 1 width x resolution in pixels
2, 3 height y resolution in pixels
4, 5 xoffset unused
6, 7 yoffset unused
8, 9 bits/pixel 8 for matte files (0x8)

The coverage (matte) information is then run-length encoded in 2-byte packets on a per-scanline basis (that is, runs do not extend beyond a single scanline) starting with the top scanline in the image, where a value of zero indicates no coverage and a value of 255 indicates complete coverage of that pixel:

bytes data range notes
runlength 1 - 255 number of pixels in succession with given coverage
coverage 0 - 255 value for coverage

Example

The following is an octal dump of an 8x6 Alias matte file for a sphere that nearly fills the image:

0000000 0008 0006 0000 0005 0008 0100 0110 015f 0000020 02bf 015f 0110 0100 0100 015f 04ff 015f 0000040 0100 0100 01bf 04ff 01bf 0100 0100 01bf 0000060 04ff 01bf 0100 0100 015f 04ff 015f 0100 0000100 0100 010f 015f 02bf 015f 010f 0100 0000116

This is read as describing an image that is 8 pixels wide [0008] and 6 scanlines high [0006]. The next four bytes describe the obsolete offset information.This is a matte file since there are 8 bits/pixel [0008].The description below shows the remainder of the file which describes the matte from the top scanline to the bottom.

0100 - one pixel of 0/255 (0%) coverage, 0110 - one pixel of 16/255 (6%) coverage, 015f - one pixel of 95/255 (37%) coverage, 02bf - two pixels of 191/255 (75%) coverage,  015f - one pixel of 95/255 (37%) coverage, 0110 - one pixel of 16/255 (6%) coverage, 0100 - one pixel of 0/255 (0%) coverage.

Now you know you are on the next scanline since the first is filled.

0100 - one pixel of 0/255 (0%) coverage, 015f - one pixel of 95/255 (37%) coverage, 04ff - four pixels of 255/255 (100%) coverage, 015f - one pixel of 95/255 (37%) coverage, 0100 - one pixel of 0/255 (0%) coverage.

Moving on to the next scanline:

0100 - one pixel of 0/255 (0%) coverage, 01bf - one pixel of 191/255 (75%) coverage,  04ff - four pixels of 255/255 (100%) coverage, 015f - one pixel of 191/255 (75%) coverage,  0100 - one pixel of 0/255 (0%) coverage.

And so on. The next scanline is exactly the same, the one after that matches the second and the last one is the same as the first. This is the fortunate result of choosing a sphere.