- Main Page
- Data Structures
- Files

# /home/dwoods/DevIL/src-IL/include/il_pic.h

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Sources
    00004 // Copyright (C) 2000-2002 by Denton Woods
    00005 // Last modified: 05/21/2002 <--Y2K Compliant! =]
    00006 //
    00007 // Filename: src-IL/include/il_pic.h
    00008 //
    00009 // Description: Softimage Pic (.pic) functions
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013
    00014 #ifndef PIC_H
    00015 #define PIC_H
    00016
    00017 #include "il_internal.h"
    00018
    00019 #ifdef _MSC_VER
    00020 #pragma pack(push, packed_struct, 1)
    00021 #endif
    00022 typedef struct PIC_HEAD
    00023 {
    00024    ILint        Magic;                  // PIC_MAGIC_NUMBER
    00025    ILfloat      Version;                // Version of format
    00026    ILbyte       Comment[80];    // Prototype description
    00027    ILbyte       Id[4];                  // 'PICT'
    00028    ILshort      Width;                  // Image width, in pixels
    00029    ILshort      Height;                 // Image height, in pixels
    00030    ILfloat      Ratio;                  // Pixel aspect ratio
    00031    ILshort      Fields;                 // Picture field type
    00032    ILshort      Padding;                // Unused
    00033 } IL_PACKSTRUCT PIC_HEAD;
    00034
    00035 typedef struct CHANNEL
    00036 {
    00037         ILubyte Size;
    00038         ILubyte Type;
    00039         ILubyte Chan;
    00040         void    *Next;
    00041 } CHANNEL;
    00042 #ifdef _MSC_VER
    00043 #pragma pack(pop,  packed_struct)
    00044 #endif
    00045
    00046
    00047 // Data type
    00048 #define PIC_UNSIGNED_INTEGER    0x00
    00049 #define PIC_SIGNED_INTEGER              0x10    // XXX: Not implemented
    00050 #define PIC_SIGNED_FLOAT                0x20    // XXX: Not implemented
    00051
    00052
    00053 // Compression type
    00054 #define PIC_UNCOMPRESSED                0x00
    00055 #define PIC_PURE_RUN_LENGTH             0x01
    00056 #define PIC_MIXED_RUN_LENGTH    0x02
    00057
    00058 // CHANNEL types (OR'd)
    00059 #define PIC_RED_CHANNEL                 0x80
    00060 #define PIC_GREEN_CHANNEL               0x40
    00061 #define PIC_BLUE_CHANNEL                0x20
    00062 #define PIC_ALPHA_CHANNEL               0x10
    00063 #define PIC_SHADOW_CHANNEL              0x08    // XXX: Not implemented
    00064 #define PIC_DEPTH_CHANNEL               0x04    // XXX: Not implemented
    00065 #define PIC_AUXILIARY_1_CHANNEL 0x02    // XXX: Not implemented
    00066 #define PIC_AUXILIARY_2_CHANNEL 0x01    // XXX: Not implemented
    00067
    00068 ILboolean iIsValidPic(void);
    00069 ILboolean iCheckPic(PIC_HEAD *Header);
    00070 ILboolean iLoadPicInternal(void);
    00071 ILboolean readScanlines(ILuint *image, ILint width, ILint height, CHANNEL *channel, ILuint alpha);
    00072 ILuint    readScanline(ILubyte *scan, ILint width, CHANNEL *channel,  ILint bytes);
    00073 ILboolean channelReadRaw(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes);
    00074 ILboolean channelReadPure(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes);
    00075 ILboolean channelReadMixed(ILubyte *scan, ILint width, ILint noCol, ILint *off, ILint bytes);
    00076
    00077
    00078
    00079 #endif//PIC_H