What Reads .iff Files
You read the endianness marker correctly but you do not act upon it. From Adobe's 'TIFF 6':Bytes 0-1:The byte order used within the file. Legal values are:“II” (4949.H)“MM” (4D4D.H)In the “II” format, byte order is always from the least significant byte to the most significant byte, for both 16-bit and 32-bit integers. This is called little-endian byte order. In the “MM” format, byte order is always from most significant to least significant, for both 16-bit and 32-bit integers.
This is called big-endian byte order.You need two sets of routines to read a short integer from a TIFF file (and also to read the longer integral types): one that reads Motorola ('MM') big-endian numbers, and one that reads Intel ('II') little-endians.As it is, you must be one a little-endian system while attemtping to natively read big-endian numbers.The code to correctly read a word can be as simple as unsigned char d1,d2;imfile.read (&d1,1);imfile.read (&d2,1);if (magicno 0x4949)word = d1 + (d2.
Iff Format Photoshop
What is an IFF file?IFF is an acronym for Interchange File Format. Files that contain the.iff file extension are used to exchange documents across multiple computer platforms, allowing a user running on one platform to share files with a user running on an entirely different computer platform.The universal IFF file format was created by Electronic Arts. Files that contain the.iff file suffix may contain text, graphics and even audio data.The Alias Wavefront software application also uses the.iff file extension. These IFF files contain image files that are created by the software.The TextCraft software program also uses the.iff file suffix. The IFF files that are saved within this software application contain document files that have been created with the TextCraft program.