root/branches/perian-1.1/EI_Image.h

Revision 1, 1.3 kB (checked in by durin42, 2 years ago)

Initial import of what was my revision 16. Good to have this in a reliable
SVN repository.

Line 
1
2 #ifndef __EI_IMAGE__
3 #define __EI_IMAGE__
4
5 #if __APPLE_CC__
6     #include <QuickTime/Movies.h>
7 #else
8     #include <Movies.h>
9 #endif
10
11 #define imageCreator    'EIAD'
12 #define imageType               'EIDI'
13
14 #if PRAGMA_STRUCT_ALIGN
15         #pragma options align=mac68k
16 #elif PRAGMA_STRUCT_PACKPUSH
17         #pragma pack(push, 2)
18 #elif PRAGMA_STRUCT_PACK
19         #pragma pack(2)
20 #endif
21
22 typedef struct {
23         UInt16 imageVersion;                                            /* Image file version (5) */
24         UInt32 imageFrames;                                                     /* Number of frames in the file (1..?) */
25 } ImageHeader, *ImageHeaderPtr;
26
27 typedef struct {
28         QTFloatSingle frameTime;                                        /* Time of frame (0.0) */
29         Rect frameRect;                                                         /* Frame Rectangle */
30         UInt8 frameBitDepth;                                            /* Bits Per Pixel (not including alpha) */
31         UInt8 frameType;                                                        /* Pixel Type (0=Direct; 1=Indexed) */
32         Rect framePackRect;                                                     /* Packing rectangle */
33         UInt8 framePacking;                                                     /* Packing Mode (0=Not Packed; 1=RL Encoding) */
34         UInt8 frameAlpha;                                                       /* Alpha Bits per pixel */
35         UInt32 frameSize;                                                       /* Size in bytes of the body of the image */
36         UInt16 framePalettes;                                           /* Number of entries in the color table (1..256) */
37         UInt16 frameBackground;                                         /* The index of the background color (0) */
38 } ImageFrame, *ImageFramePtr;
39
40 #if PRAGMA_STRUCT_ALIGN
41         #pragma options align=reset
42 #elif PRAGMA_STRUCT_PACKPUSH
43         #pragma pack(pop)
44 #elif PRAGMA_STRUCT_PACK
45         #pragma pack()
46 #endif
47
48 #endif
Note: See TracBrowser for help on using the browser.