[N-World Contents] [Book Contents] [Prev] [Next] [Index]

TPX File Format


The section below describes Nichmen's TPX image file format.


Header

To view an octal dump of a TPX image, enter the following command at a UNIX shell prompt:

od filename

The result displays an octal listing of the information for the specified file. The header for a TPX file looks like this:

000000 32 42 70 78 31 36 20 20 20 20 20 20 20 20 33 32 2bpx16........32

000016 20 20 20 20 20 20 20 30 20 20 20 20 20 20 20 30 .......0.......0

000032 20 20 20 20 20 31 35 30 20 20 20 20 20 31 35 30 .....150.....150

000048 20 20 31 30 30 30 30 30 20 20 31 30 30 30 30 30 ..100000..100000

000064 20 42 20 30 78 20 36 00 20 20 20 20 20 20 20 20 .b.0x.6.........

000080 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................

000096 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................

000112 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ................

The header file can be interpreted as follows:

1st Line

2 two-dimensional
b binary
px picture pixel
1 version
6 machine type (3=Sun, 6=SGI)
32 pixel depth

2nd Line

0 x-offset
0 y-offset

3rd Line

150 image width
150 image height

4th Line

100000 always 100000
100000 always 100000

5th Line

b b=both fields, e=even fields only, o=odd fields only

6 A bit status word, which is a combination of the following components: M=1, Alpha=2 RGB=4, Z=8

If the value of the bit status word in line five is six, the assumed byte order is ABGR.

If the value of the bit status word in line five is four, the assumed byte order is BGR.

Table A.1 Bit order in TPX file format
Bits Channel
0-7

Alpha

8-15

Blue

16-23

Green

24-31

Red

6th, 7th, & 8th Line

Filler.

Following Lines

The rest of the file is packed with image data.



[N-World Contents] [Book Contents] [Prev] [Next] [Index]

Another fine product from Nichimen documentation!

Copyright © 1996, Nichimen Graphics Corporation. All rights reserved.