Download information is at: AffineŽ Toolkit.
Support for Maya's IFF files has been added with iffinfo, iff2tiff, tiff2iff, and iff2iff. This package is based on the code in the AffineŽ Toolkit's affine/pixNtiff/ subdirectory. New TIFF tools have also been added. For those who find Maya 1.0 "upside-down" oriented TIFF files to be annoying, the tifforient tool can be used to change the orientation of a set of TIFF files.
Also included is a tool to invert the image of a TIFF file with tiffinvert and a tool called tifftile that can assemble CropWindow created TIFF files from both Pixar's PRMan and BMRT's rendrib.
Both Maya 1.0 and Composer 4.5 IFF files (8bit, 12bit and 16bit) can be read. The code writes the IFF files out in Maya's 8bit and 16bit format. The 12bit format written out by Composer 4.5 can only be read not written. Also the odd GEND tags that Composer 4.5 adds to its 8bit and 12bit files are handled when reading by are not written by the tools here. The format choosen when writing matches that of Maya 1.0.
Basically Maya IFF files are fully supported both compressed and uncompressed. Composer 4.5 does not appear to support Maya 1.0 16 bit IFF files and instead uses some odd IFF format that the tools included here can read.
Located in affine/pixNtiff/ are several C files that are used to read and write Alias's PIX, Maya IFF, TIFF, and TGA file formats. Included is also the ability to write X Windows bitmaps or read Pixar's zfile format.
Each fully supported format has two self-named C files prefixed with a 'r' for reading and a 'w' for writing. TIFF for example has rtiff.c and wtiff.c with the functions ReadTiff() and WriteTiff() respectively. Each 'r' and 'w' file has an associated header file with a ".h" filename extension. Refer to these headers for the main function exported by its associated C file.
The writing functions rely on a data structure called simply BITMAP defined in the header affine/pixNtiff/bitmap.h with the following code:
typedef struct _BITMAP {
unsigned int xres;
unsigned int yres;
unsigned int xpos;
unsigned int ypos;
unsigned int sampleformat; /* uint8, uint16 or IEEE floats. */
unsigned int orientation; /* Refer to flags in bitmap.h. */
unsigned int nsamples; /* How many channels. */
unsigned int bitspersample;
unsigned int rowbytes; /* for an RGB image rowbytes = 3*xres */
/* rowbytes is needed incase padding is needed */
PBITS pbits;
} BITMAP;
typedef BITMAP *PBITMAP;
Most of the code in affine/pixNtiff/ avoids issues with the processor's endedness. But some code does use a flag called LITTLE_ENDIAN. For information on big-endian and little-endian refer to the section Ten Little Endians for a brief overview of what the term "endian" means.
Copyright (c) 1995, 1996, 1997, 1998 Thomas E. Burge. All rights reserved.
Affine is a trademark of Thomas E. Burge
THIS SOFTWARE IS DISTRIBUTED "AS-IS" WITHOUT WARRANTY OF ANY KIND
AND WITHOUT ANY GUARANTEE OF MERCHANTABILITY OR FITNESS FOR A
PARTICULAR PURPOSE.
In no event shall T. Burge be liable for any indirect or
consequential damages or loss of data resulting from use or performance
of this software.
The AffineŽ Libraries and Tools are
Copyright (c) 1995, 1996, 1997, 1998 T. Burge.
All rights reserved.