- Main Page
- Data Structures
- Files

- File List
- Globals

# E:/DevIL/src-IL/include/il_exr.h

    00001 //-----------------------------------------------------------------------------
    00002 //
    00003 // ImageLib Sources
    00004 // Copyright (C) 2000-2008 by Denton Woods
    00005 // Last modified: 08/29/2008
    00006 //
    00007 // Filename: src-IL/include/il_exr.h
    00008 //
    00009 // Description: Reads from an OpenEXR (.exr) file.
    00010 //
    00011 //-----------------------------------------------------------------------------
    00012
    00013
    00014 #ifndef EXR_H
    00015 #define EXR_H
    00016
    00017 #include "il_internal.h"
    00018 #include <ImfIO.h>
    00019
    00020
    00021 //using namespace Imf;  // Using this leads to errors with Microsoft's IStream.
    00022                                                 //   So it is better to just specify the namespace explicitly.
    00023
    00024
    00025 typedef struct EXRHEAD
    00026 {
    00027         ILuint          MagicNumber;            // File signature (0x76, 0x2f, 0x31, 0x01)
    00028         ILuint          Version;                        // Treated as two bitfields
    00029 } IL_PACKSTRUCT EXRHEAD;
    00030
    00031 //@TODO: Should I just do these as enums?
    00032 #define EXR_UINT 0
    00033 #define EXR_HALF 1
    00034 #define EXR_FLOAT 2
    00035
    00036 #define EXR_NO_COMPRESSION    0
    00037 #define EXR_RLE_COMPRESSION   1
    00038 #define EXR_ZIPS_COMPRESSION  2
    00039 #define EXR_ZIP_COMPRESSION   3
    00040 #define EXR_PIZ_COMPRESSION   4
    00041 #define EXR_PXR24_COMPRESSION 5
    00042 #define EXR_B44_COMPRESSION   6
    00043 #define EXR_B44A_COMPRESSION  7
    00044
    00045
    00046 #ifdef __cplusplus
    00047 extern "C" {
    00048 #endif
    00049
    00050 ILboolean iIsValidExr();
    00051 ILboolean iCheckExr(EXRHEAD *Header);
    00052 ILboolean iLoadExrInternal();
    00053 ILboolean iSaveExrInternal();
    00054
    00055 #ifdef __cplusplus
    00056 }
    00057 #endif
    00058
    00059 class ilIStream : public Imf::IStream
    00060 {
    00061         public:
    00062                 ilIStream(/*ILHANDLE Handle*/);
    00063                 virtual bool    read (char c[/*n*/], int n);
    00064                 // I don't think I need this one, since we are taking care of the file handles ourselves.
    00065                 //virtual char *        readMemoryMapped (int n);
    00066                 virtual Imf::Int64      tellg ();
    00067                 virtual void    seekg (Imf::Int64 Pos);
    00068                 virtual void    clear ();
    00069
    00070         protected:
    00071
    00072         private:
    00073 };
    00074
    00075 class ilOStream : public Imf::OStream
    00076 {
    00077         public:
    00078                 ilOStream(/*ILHANDLE Handle*/);
    00079                 virtual void    write (const char c[/*n*/], int n);
    00080                 // I don't think I need this one, since we are taking care of the file handles ourselves.
    00081                 //virtual char *        readMemoryMapped (int n);
    00082                 virtual Imf::Int64      tellp ();
    00083                 virtual void    seekp (Imf::Int64 Pos);
    00084
    00085         protected:
    00086
    00087         private:
    00088 };
    00089
    00090 #endif//EXR_H