/* File : TIFF.H Description: Include File for TIFF -> RLC Converter Author : Peter H. Michalicka Environment: HP-UX 8.05 */ typedef unsigned char BYTE; typedef unsigned short WORD; typedef long LONG; typedef unsigned long DWORD; #define BLKSIZE 32768 #define TRUE 1 #define FALSE 0 typedef struct { FILE *fpi; int ipos; int ilen; BYTE ibuf[BLKSIZE]; char *fnam; } WorkFile; /* INTEL RLC */ #define RLC_START 1 #define MAX_RUN 16382 #define MAX_IMAGE 32766 /* 32766 = 32767 - RLC_START */ /* TIFF */ #define INTELTIFF 0x4949 #define MOTOROLATIFF 0x4d4d #define VERSION42 42 typedef struct { WORD Version; DWORD IFDoffset; WORD n_ifd; } TIFFHDR; typedef struct { WORD Tag; WORD Type; DWORD Length; DWORD Value; } IFD; #define TIFFSHORT 2 #define TIFFLONG 4 #define TIFFRATIONAL 8 typedef struct { WORD BytesPerRow; /* ImageWidth, SamplesPerPixel, BitsPerSample */ LONG StripsPerImage; /* ImageLength, RowsPerStrip */ WORD GrayScale; /* TRUE -> BitsPerSample > 1 */ WORD NewSubfileType; /* 0 */ WORD SubFileType; /* no default */ LONG ImageWidth; /* must be */ LONG ImageLength; /* must be */ WORD BitsPerSample; /* 1 */ WORD Compression; /* 1 */ WORD PhotometricInterpretation; /* must be */ WORD Thresholding; /* 1 */ WORD FillOrder; /* 1 */ LONG StripOffsets; /* no default | SubFileType <= 2 must be*/ WORD Orientation; /* 1 */ WORD SamplesPerPixel; /* 1 */ LONG RowsPerStrip; /* may be */ LONG StripByteCounts; /* no default */ WORD XResolution; /* no default */ WORD YResolution; /* no default */ WORD PlanarConfiguration; /* 1 */ WORD ResolutionUnit; /* 2 */ WORD Predictor; /* 1 */ } IMAGE; /* default values */