Home Home Applications Products Products Support Support Downloads Downloads Company Company

.TIFF File Format
Description with Compix Private Tags

The Tag Image File Format (TIFF) was developed jointly by Aldus Corporation and Microsoft Corporation in conjunction with other interested parties. Specifically, the data is stored as "Class-P Palette color images" with accompanying palette data containing information about how this data was displayed at the time it was stored. For a complete description of TIFF data structures see pages 1 - 22 of the "Tag Image File Format Specification, Revision 5.0" dated 8/8/88. The TIFF file begins as follows:

The image file header
2 bytes byte_order = II
2 bytes tiff_version = 42
4 bytes first_ifd = offset determined by program

The image file directory
2 bytes ifd_length = 20 we use 20 tags

The tags begin immediately following the above header. The tags and their likely values listed below are not necessarily in the order that they will be encountered in the file.

The Directory Entries, 12 bytes each entry
Tag Name Tag Code Type Length Value; Pointer
  (2 bytes) (2 bytes) (4 bytes) (4 bytes)
newsubfiletype 254 LONG 1 0
imagewidth 256 SHORT 1 IMAGEWIDTH
imagelength 257 SHORT 1 IMAGEHEIGHT
bitspersample 258 SHORT 1 8; 8-bit, single plane data
compression 259 SHORT 1 1; no compression, pack bytes
photointerp 262 SHORT 1 3; image is color, single plane
make 271 ASCII 7 COMPIX
model 272 ASCII 5 6000
stripoffsets 273 LONG 1 offset; to actual image data
samplesperpixel 277 SHORT 1 1; 'Palette Color' or bilevel
rowsperstrip 278 LONG 1 imageheight; all rows in 1 strip
stripbytecount 279 LONG 1 imageheight*imagewidth; all in 1 strip
xresolution 282 RATNL 1 75 dots per inch
yresolution 283 RATNL 1 75 dots per inch


SHORT 1 1; single image plane
resunit 296 SHORT 1 2 res is in dots per INCH
software 305 ASCII 24 offset; "COM6 original file type"
colormap 320 SHORT 768 offset; 3 x 255 colormap table
compixprivate 32970 SHORT 23 offset; 23 words in tag
compixprivate 32971 SHORT 21 offset; 21 words in tag
compixprivate 32972 SHORT varies offset; "WinTES" files only

4 bytes next_ifd = 0 signals end of tags

The Compix Private Tag #1 (32970)
Length Name Ref# Brief Description
2 bytes height (1) image height
2 bytes width (2) image width
2 bytes scale (3) degrees per color
2 bytes multfact (4) deg or mW per bit multiply factor
2 bytes divfact (5) deg or mW per bit divide factor
2 bytes basetemp (6) image base temperature
2 bytes reftemp (7) image reference temperature
2 bytes ambtemp (8) reserved for ambient temperature
2 bytes refval (9) image reference value
2 bytes minimum (10) image minimum temp value
2 bytes maximum (11) image maximum temp value
2 bytes flagbyte (12) flag byte
2 bytes day (13) time & date image was taken: day
2 bytes month (14)   month
2 bytes year (15)   year
2 bytes hours (16)   hour
2 bytes minutes (17)   minute
2 bytes emissivity (18) emissivity correction at image time
2 bytes version_cmap (19) 6000 firmware version and 6000 colormap
2 bytes bracketpos (20) position of brackets in scale menu
2 bytes varcolorscale (21) variable color scale
2 bytes xcursor (22) thermal cursor position in x
2 bytes ycursor (23) thermal cursor position in y
The Compix Private Tag #2 (32971)
2 bytes val_zbox_x   the zoom box location in x
2 bytes val_zbox_y   the zoom box location in y
2 bytes val_zbox_ht   the zoom box height
2 bytes val_zbox_wd   the zoom box width
2 bytes Unused   reserved for future use
The Compix Private Tag#3 (32972)
(This tag came into use with "WinTES" software)
47092 bytes     fractional part of the 193 x 244 pixels' data
varying bytes     the "image parm data structure" as defined for the .CPX format

The main purpose of the data in private tag #1 is to enable COM6 (and any other software) to correctly interpret the real physical meaning of the data. Another purpose is to enable COM6 to redisplay the data as it was saved. Yet another requirement is to be able to restore the status of the Compix 6000 Thermal Imaging System when a previously uploaded file is downloaded back to the 6000. Hence, some items are unimportant to interpreting the data in any environment outside the 6000.

In the following descriptions of the data items contained in private tag #1 hexadecimal values are denoted with a suffix h.

Ref# Description

1,2 Screen height (width) in pixels of the thermal image. For a standard image, the number of rows (columns) is 193 (244).

3 The degrees celsius (or mW per sq. cm.) times ten. The power-up default is 14h (20) representing 2.0 units per color step. Even if fahrenheit is selected, this parameter will still be in celsius degrees.

4,5 These are unsigned binary integers. Their ratio defines the granularity of the image array data. Their values correspond to the scale (standard or extended) by which the image array was acquired and have nothing to do with the scale at which the image was displayed when it was uploaded and/or saved.

6 The base temperature is the temperature of the bottom of the display scale at the time the image was uploaded and/or saved.

7 The reference temperature is expressed in celsius degrees (or mW/cm2) times ten. It is the real-world measure for the image array quantity defined as the reference value (see item 9).

8 This item is reserved for recording the ambient temperature at time of image acquisition. Presently, it is set to a value representing 21øC.

9 The reference value is the image array value that is used to represent the measurement amount defined by reference temperature.

10,11 The minimum (maximum) value appearing anywhere in the image array.

12 The flag byte is defined as follows:
bit meaning
0 lsb unused
1 0 => normal image, 1 => fast-mode image
2 0 => actual image, 1 => difference image
3 0 => temperature, 1=> power density
4 0 => normal scale, 1 => extended (higher) scales
5-14 unused
15 msb unused

13-17 These items record time and date of image acquisition as indicated. These values will be zero for TIFF files resulting from conversion of old in-house format files.

18 The value times ten of the percent emissivity correction in effect at the time the image was acquired. Valid only if Ref# 19 identifies non-zero firmware version. TIFF files using Compix private tag #3 described above have the value zero recorded in this position.

19 The lower byte of this item identifies the colormap in use on the 6000 at the time the image was uploaded. The upper byte identifies the firmware version in use by the 6000. The upper byte being zero identifies 6000 firmware with only limited remote control capability and which did not properly report the emissivity setting. The upper byte being non-zero identifies 6000 firmware having full remote control capability and for which item Ref# 18 correctly reports the emissivity setting.

20 This cardinal number indicates the position in the scale menu of the selected units per color.

21 The value in the variable item at the end of the scale menu regardless of whether or not it was in use.

22,23 The X (Y) position of the temperature readout cursor.

The 193*244 = 47,092 byte image array is pointed to by TIFF tag# 273 and corresponds to the last 47,092 bytes of the old in-house format. In either case, the following description applies.

These bytes are stored beginning with the upper left corner, followed by the rest of the top row, and then proceeding down through the image row by row.

The temperature represented by each byte is calculated as follows:

0.1 * ( RefTemp + 10*( (ArrayByte - RefVal) * ---------- ) )

Compix is a registered trademark of Compix Incorporated. Copyright © 2010 Compix Incorporated. All rights reserved.