Oolite 1.91.0.7644-241112-7f5034b
Loading...
Searching...
No Matches
tinyexr.h File Reference
#include <stddef.h>
#include <stdint.h>
+ Include dependency graph for tinyexr.h:

Go to the source code of this file.

Classes

struct  TEXRVersion
 
struct  TEXRAttribute
 
struct  TEXRChannelInfo
 
struct  TEXRTile
 
struct  TEXRBox2i
 
struct  TEXRHeader
 
struct  TEXRMultiPartHeader
 
struct  TEXRImage
 
struct  TEXRMultiPartImage
 
struct  TDeepImage
 

Macros

#define TINYEXR_X86_OR_X64_CPU   0
 
#define TINYEXR_LITTLE_ENDIAN   1
 
#define TINYEXR_USE_MINIZ   (1)
 
#define TINYEXR_USE_STB_ZLIB   (0)
 
#define TINYEXR_USE_NANOZLIB   (0)
 
#define TINYEXR_USE_PIZ   (1)
 
#define TINYEXR_USE_ZFP   (0)
 
#define TINYEXR_USE_THREAD   (0)
 
#define TINYEXR_USE_OPENMP   (0)
 
#define TINYEXR_SUCCESS   (0)
 
#define TINYEXR_ERROR_INVALID_MAGIC_NUMBER   (-1)
 
#define TINYEXR_ERROR_INVALID_EXR_VERSION   (-2)
 
#define TINYEXR_ERROR_INVALID_ARGUMENT   (-3)
 
#define TINYEXR_ERROR_INVALID_DATA   (-4)
 
#define TINYEXR_ERROR_INVALID_FILE   (-5)
 
#define TINYEXR_ERROR_INVALID_PARAMETER   (-6)
 
#define TINYEXR_ERROR_CANT_OPEN_FILE   (-7)
 
#define TINYEXR_ERROR_UNSUPPORTED_FORMAT   (-8)
 
#define TINYEXR_ERROR_INVALID_HEADER   (-9)
 
#define TINYEXR_ERROR_UNSUPPORTED_FEATURE   (-10)
 
#define TINYEXR_ERROR_CANT_WRITE_FILE   (-11)
 
#define TINYEXR_ERROR_SERIALIZATION_FAILED   (-12)
 
#define TINYEXR_ERROR_LAYER_NOT_FOUND   (-13)
 
#define TINYEXR_ERROR_DATA_TOO_LARGE   (-14)
 
#define TINYEXR_PIXELTYPE_UINT   (0)
 
#define TINYEXR_PIXELTYPE_HALF   (1)
 
#define TINYEXR_PIXELTYPE_FLOAT   (2)
 
#define TINYEXR_MAX_HEADER_ATTRIBUTES   (1024)
 
#define TINYEXR_MAX_CUSTOM_ATTRIBUTES   (128)
 
#define TINYEXR_COMPRESSIONTYPE_NONE   (0)
 
#define TINYEXR_COMPRESSIONTYPE_RLE   (1)
 
#define TINYEXR_COMPRESSIONTYPE_ZIPS   (2)
 
#define TINYEXR_COMPRESSIONTYPE_ZIP   (3)
 
#define TINYEXR_COMPRESSIONTYPE_PIZ   (4)
 
#define TINYEXR_COMPRESSIONTYPE_ZFP   (128)
 
#define TINYEXR_ZFP_COMPRESSIONTYPE_RATE   (0)
 
#define TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION   (1)
 
#define TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY   (2)
 
#define TINYEXR_TILE_ONE_LEVEL   (0)
 
#define TINYEXR_TILE_MIPMAP_LEVELS   (1)
 
#define TINYEXR_TILE_RIPMAP_LEVELS   (2)
 
#define TINYEXR_TILE_ROUND_DOWN   (0)
 
#define TINYEXR_TILE_ROUND_UP   (1)
 

Typedefs

typedef struct TEXRVersion EXRVersion
 
typedef struct TEXRAttribute EXRAttribute
 
typedef struct TEXRChannelInfo EXRChannelInfo
 
typedef struct TEXRTile EXRTile
 
typedef struct TEXRBox2i EXRBox2i
 
typedef struct TEXRHeader EXRHeader
 
typedef struct TEXRMultiPartHeader EXRMultiPartHeader
 
typedef struct TEXRImage EXRImage
 
typedef struct TEXRMultiPartImage EXRMultiPartImage
 
typedef struct TDeepImage DeepImage
 

Functions

int LoadEXR (float **out_rgba, int *width, int *height, const char *filename, const char **err)
 
int LoadEXRWithLayer (float **out_rgba, int *width, int *height, const char *filename, const char *layer_name, const char **err)
 
int EXRLayers (const char *filename, const char **layer_names[], int *num_layers, const char **err)
 
int IsEXR (const char *filename)
 
int IsEXRFromMemory (const unsigned char *memory, size_t size)
 
int SaveEXRToMemory (const float *data, const int width, const int height, const int components, const int save_as_fp16, unsigned char **buffer, const char **err)
 
int SaveEXR (const float *data, const int width, const int height, const int components, const int save_as_fp16, const char *filename, const char **err)
 
int EXRNumLevels (const EXRImage *exr_image)
 
void InitEXRHeader (EXRHeader *exr_header)
 
void EXRSetNameAttr (EXRHeader *exr_header, const char *name)
 
void InitEXRImage (EXRImage *exr_image)
 
int FreeEXRHeader (EXRHeader *exr_header)
 
int FreeEXRImage (EXRImage *exr_image)
 
void FreeEXRErrorMessage (const char *msg)
 
int ParseEXRVersionFromFile (EXRVersion *version, const char *filename)
 
int ParseEXRVersionFromMemory (EXRVersion *version, const unsigned char *memory, size_t size)
 
int ParseEXRHeaderFromFile (EXRHeader *header, const EXRVersion *version, const char *filename, const char **err)
 
int ParseEXRHeaderFromMemory (EXRHeader *header, const EXRVersion *version, const unsigned char *memory, size_t size, const char **err)
 
int ParseEXRMultipartHeaderFromFile (EXRHeader ***headers, int *num_headers, const EXRVersion *version, const char *filename, const char **err)
 
int ParseEXRMultipartHeaderFromMemory (EXRHeader ***headers, int *num_headers, const EXRVersion *version, const unsigned char *memory, size_t size, const char **err)
 
int LoadEXRImageFromFile (EXRImage *image, const EXRHeader *header, const char *filename, const char **err)
 
int LoadEXRImageFromMemory (EXRImage *image, const EXRHeader *header, const unsigned char *memory, const size_t size, const char **err)
 
int LoadEXRMultipartImageFromFile (EXRImage *images, const EXRHeader **headers, unsigned int num_parts, const char *filename, const char **err)
 
int LoadEXRMultipartImageFromMemory (EXRImage *images, const EXRHeader **headers, unsigned int num_parts, const unsigned char *memory, const size_t size, const char **err)
 
int SaveEXRImageToFile (const EXRImage *image, const EXRHeader *exr_header, const char *filename, const char **err)
 
size_t SaveEXRImageToMemory (const EXRImage *image, const EXRHeader *exr_header, unsigned char **memory, const char **err)
 
int SaveEXRMultipartImageToFile (const EXRImage *images, const EXRHeader **exr_headers, unsigned int num_parts, const char *filename, const char **err)
 
size_t SaveEXRMultipartImageToMemory (const EXRImage *images, const EXRHeader **exr_headers, unsigned int num_parts, unsigned char **memory, const char **err)
 
int LoadDeepEXR (DeepImage *out_image, const char *filename, const char **err)
 
int LoadEXRFromMemory (float **out_rgba, int *width, int *height, const unsigned char *memory, size_t size, const char **err)
 

Macro Definition Documentation

◆ TINYEXR_COMPRESSIONTYPE_NONE

#define TINYEXR_COMPRESSIONTYPE_NONE   (0)

Definition at line 171 of file tinyexr.h.

◆ TINYEXR_COMPRESSIONTYPE_PIZ

#define TINYEXR_COMPRESSIONTYPE_PIZ   (4)

Definition at line 175 of file tinyexr.h.

◆ TINYEXR_COMPRESSIONTYPE_RLE

#define TINYEXR_COMPRESSIONTYPE_RLE   (1)

Definition at line 172 of file tinyexr.h.

◆ TINYEXR_COMPRESSIONTYPE_ZFP

#define TINYEXR_COMPRESSIONTYPE_ZFP   (128)

Definition at line 176 of file tinyexr.h.

◆ TINYEXR_COMPRESSIONTYPE_ZIP

#define TINYEXR_COMPRESSIONTYPE_ZIP   (3)

Definition at line 174 of file tinyexr.h.

◆ TINYEXR_COMPRESSIONTYPE_ZIPS

#define TINYEXR_COMPRESSIONTYPE_ZIPS   (2)

Definition at line 173 of file tinyexr.h.

◆ TINYEXR_ERROR_CANT_OPEN_FILE

#define TINYEXR_ERROR_CANT_OPEN_FILE   (-7)

Definition at line 152 of file tinyexr.h.

◆ TINYEXR_ERROR_CANT_WRITE_FILE

#define TINYEXR_ERROR_CANT_WRITE_FILE   (-11)

Definition at line 156 of file tinyexr.h.

◆ TINYEXR_ERROR_DATA_TOO_LARGE

#define TINYEXR_ERROR_DATA_TOO_LARGE   (-14)

Definition at line 159 of file tinyexr.h.

◆ TINYEXR_ERROR_INVALID_ARGUMENT

#define TINYEXR_ERROR_INVALID_ARGUMENT   (-3)

Definition at line 148 of file tinyexr.h.

◆ TINYEXR_ERROR_INVALID_DATA

#define TINYEXR_ERROR_INVALID_DATA   (-4)

Definition at line 149 of file tinyexr.h.

◆ TINYEXR_ERROR_INVALID_EXR_VERSION

#define TINYEXR_ERROR_INVALID_EXR_VERSION   (-2)

Definition at line 147 of file tinyexr.h.

◆ TINYEXR_ERROR_INVALID_FILE

#define TINYEXR_ERROR_INVALID_FILE   (-5)

Definition at line 150 of file tinyexr.h.

◆ TINYEXR_ERROR_INVALID_HEADER

#define TINYEXR_ERROR_INVALID_HEADER   (-9)

Definition at line 154 of file tinyexr.h.

◆ TINYEXR_ERROR_INVALID_MAGIC_NUMBER

#define TINYEXR_ERROR_INVALID_MAGIC_NUMBER   (-1)

Definition at line 146 of file tinyexr.h.

◆ TINYEXR_ERROR_INVALID_PARAMETER

#define TINYEXR_ERROR_INVALID_PARAMETER   (-6)

Definition at line 151 of file tinyexr.h.

◆ TINYEXR_ERROR_LAYER_NOT_FOUND

#define TINYEXR_ERROR_LAYER_NOT_FOUND   (-13)

Definition at line 158 of file tinyexr.h.

◆ TINYEXR_ERROR_SERIALIZATION_FAILED

#define TINYEXR_ERROR_SERIALIZATION_FAILED   (-12)

Definition at line 157 of file tinyexr.h.

◆ TINYEXR_ERROR_UNSUPPORTED_FEATURE

#define TINYEXR_ERROR_UNSUPPORTED_FEATURE   (-10)

Definition at line 155 of file tinyexr.h.

◆ TINYEXR_ERROR_UNSUPPORTED_FORMAT

#define TINYEXR_ERROR_UNSUPPORTED_FORMAT   (-8)

Definition at line 153 of file tinyexr.h.

◆ TINYEXR_LITTLE_ENDIAN

#define TINYEXR_LITTLE_ENDIAN   1

Definition at line 101 of file tinyexr.h.

◆ TINYEXR_MAX_CUSTOM_ATTRIBUTES

#define TINYEXR_MAX_CUSTOM_ATTRIBUTES   (128)

Definition at line 169 of file tinyexr.h.

◆ TINYEXR_MAX_HEADER_ATTRIBUTES

#define TINYEXR_MAX_HEADER_ATTRIBUTES   (1024)

Definition at line 168 of file tinyexr.h.

◆ TINYEXR_PIXELTYPE_FLOAT

#define TINYEXR_PIXELTYPE_FLOAT   (2)

Definition at line 166 of file tinyexr.h.

◆ TINYEXR_PIXELTYPE_HALF

#define TINYEXR_PIXELTYPE_HALF   (1)

Definition at line 165 of file tinyexr.h.

◆ TINYEXR_PIXELTYPE_UINT

#define TINYEXR_PIXELTYPE_UINT   (0)

Definition at line 164 of file tinyexr.h.

◆ TINYEXR_SUCCESS

#define TINYEXR_SUCCESS   (0)

Definition at line 145 of file tinyexr.h.

◆ TINYEXR_TILE_MIPMAP_LEVELS

#define TINYEXR_TILE_MIPMAP_LEVELS   (1)

Definition at line 183 of file tinyexr.h.

◆ TINYEXR_TILE_ONE_LEVEL

#define TINYEXR_TILE_ONE_LEVEL   (0)

Definition at line 182 of file tinyexr.h.

◆ TINYEXR_TILE_RIPMAP_LEVELS

#define TINYEXR_TILE_RIPMAP_LEVELS   (2)

Definition at line 184 of file tinyexr.h.

◆ TINYEXR_TILE_ROUND_DOWN

#define TINYEXR_TILE_ROUND_DOWN   (0)

Definition at line 186 of file tinyexr.h.

◆ TINYEXR_TILE_ROUND_UP

#define TINYEXR_TILE_ROUND_UP   (1)

Definition at line 187 of file tinyexr.h.

◆ TINYEXR_USE_MINIZ

#define TINYEXR_USE_MINIZ   (1)

Definition at line 109 of file tinyexr.h.

◆ TINYEXR_USE_NANOZLIB

#define TINYEXR_USE_NANOZLIB   (0)

Definition at line 119 of file tinyexr.h.

◆ TINYEXR_USE_OPENMP

#define TINYEXR_USE_OPENMP   (0)

Definition at line 141 of file tinyexr.h.

◆ TINYEXR_USE_PIZ

#define TINYEXR_USE_PIZ   (1)

Definition at line 124 of file tinyexr.h.

◆ TINYEXR_USE_STB_ZLIB

#define TINYEXR_USE_STB_ZLIB   (0)

Definition at line 114 of file tinyexr.h.

◆ TINYEXR_USE_THREAD

#define TINYEXR_USE_THREAD   (0)

Definition at line 133 of file tinyexr.h.

◆ TINYEXR_USE_ZFP

#define TINYEXR_USE_ZFP   (0)

Definition at line 128 of file tinyexr.h.

◆ TINYEXR_X86_OR_X64_CPU

#define TINYEXR_X86_OR_X64_CPU   0

Definition at line 97 of file tinyexr.h.

◆ TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY

#define TINYEXR_ZFP_COMPRESSIONTYPE_ACCURACY   (2)

Definition at line 180 of file tinyexr.h.

◆ TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION

#define TINYEXR_ZFP_COMPRESSIONTYPE_PRECISION   (1)

Definition at line 179 of file tinyexr.h.

◆ TINYEXR_ZFP_COMPRESSIONTYPE_RATE

#define TINYEXR_ZFP_COMPRESSIONTYPE_RATE   (0)

Definition at line 178 of file tinyexr.h.

Typedef Documentation

◆ DeepImage

typedef struct TDeepImage DeepImage

◆ EXRAttribute

typedef struct TEXRAttribute EXRAttribute

◆ EXRBox2i

typedef struct TEXRBox2i EXRBox2i

◆ EXRChannelInfo

◆ EXRHeader

typedef struct TEXRHeader EXRHeader

◆ EXRImage

typedef struct TEXRImage EXRImage

◆ EXRMultiPartHeader

◆ EXRMultiPartImage

◆ EXRTile

typedef struct TEXRTile EXRTile

◆ EXRVersion

typedef struct TEXRVersion EXRVersion

Function Documentation

◆ EXRLayers()

int EXRLayers ( const char * filename,
const char ** layer_names[],
int * num_layers,
const char ** err )
extern

◆ EXRNumLevels()

int EXRNumLevels ( const EXRImage * exr_image)
extern

◆ EXRSetNameAttr()

void EXRSetNameAttr ( EXRHeader * exr_header,
const char * name )
extern

◆ FreeEXRErrorMessage()

void FreeEXRErrorMessage ( const char * msg)
extern

◆ FreeEXRHeader()

int FreeEXRHeader ( EXRHeader * exr_header)
extern

◆ FreeEXRImage()

int FreeEXRImage ( EXRImage * exr_image)
extern

◆ InitEXRHeader()

void InitEXRHeader ( EXRHeader * exr_header)
extern

◆ InitEXRImage()

void InitEXRImage ( EXRImage * exr_image)
extern

◆ IsEXR()

int IsEXR ( const char * filename)
extern

◆ IsEXRFromMemory()

int IsEXRFromMemory ( const unsigned char * memory,
size_t size )
extern

◆ LoadDeepEXR()

int LoadDeepEXR ( DeepImage * out_image,
const char * filename,
const char ** err )
extern

◆ LoadEXR()

int LoadEXR ( float ** out_rgba,
int * width,
int * height,
const char * filename,
const char ** err )
extern

◆ LoadEXRFromMemory()

int LoadEXRFromMemory ( float ** out_rgba,
int * width,
int * height,
const unsigned char * memory,
size_t size,
const char ** err )
extern

◆ LoadEXRImageFromFile()

int LoadEXRImageFromFile ( EXRImage * image,
const EXRHeader * header,
const char * filename,
const char ** err )
extern

◆ LoadEXRImageFromMemory()

int LoadEXRImageFromMemory ( EXRImage * image,
const EXRHeader * header,
const unsigned char * memory,
const size_t size,
const char ** err )
extern

◆ LoadEXRMultipartImageFromFile()

int LoadEXRMultipartImageFromFile ( EXRImage * images,
const EXRHeader ** headers,
unsigned int num_parts,
const char * filename,
const char ** err )
extern

◆ LoadEXRMultipartImageFromMemory()

int LoadEXRMultipartImageFromMemory ( EXRImage * images,
const EXRHeader ** headers,
unsigned int num_parts,
const unsigned char * memory,
const size_t size,
const char ** err )
extern

◆ LoadEXRWithLayer()

int LoadEXRWithLayer ( float ** out_rgba,
int * width,
int * height,
const char * filename,
const char * layer_name,
const char ** err )
extern

◆ ParseEXRHeaderFromFile()

int ParseEXRHeaderFromFile ( EXRHeader * header,
const EXRVersion * version,
const char * filename,
const char ** err )
extern

◆ ParseEXRHeaderFromMemory()

int ParseEXRHeaderFromMemory ( EXRHeader * header,
const EXRVersion * version,
const unsigned char * memory,
size_t size,
const char ** err )
extern

◆ ParseEXRMultipartHeaderFromFile()

int ParseEXRMultipartHeaderFromFile ( EXRHeader *** headers,
int * num_headers,
const EXRVersion * version,
const char * filename,
const char ** err )
extern

◆ ParseEXRMultipartHeaderFromMemory()

int ParseEXRMultipartHeaderFromMemory ( EXRHeader *** headers,
int * num_headers,
const EXRVersion * version,
const unsigned char * memory,
size_t size,
const char ** err )
extern

◆ ParseEXRVersionFromFile()

int ParseEXRVersionFromFile ( EXRVersion * version,
const char * filename )
extern

◆ ParseEXRVersionFromMemory()

int ParseEXRVersionFromMemory ( EXRVersion * version,
const unsigned char * memory,
size_t size )
extern

◆ SaveEXR()

int SaveEXR ( const float * data,
const int width,
const int height,
const int components,
const int save_as_fp16,
const char * filename,
const char ** err )
extern

◆ SaveEXRImageToFile()

int SaveEXRImageToFile ( const EXRImage * image,
const EXRHeader * exr_header,
const char * filename,
const char ** err )
extern

◆ SaveEXRImageToMemory()

size_t SaveEXRImageToMemory ( const EXRImage * image,
const EXRHeader * exr_header,
unsigned char ** memory,
const char ** err )
extern

◆ SaveEXRMultipartImageToFile()

int SaveEXRMultipartImageToFile ( const EXRImage * images,
const EXRHeader ** exr_headers,
unsigned int num_parts,
const char * filename,
const char ** err )
extern

◆ SaveEXRMultipartImageToMemory()

size_t SaveEXRMultipartImageToMemory ( const EXRImage * images,
const EXRHeader ** exr_headers,
unsigned int num_parts,
unsigned char ** memory,
const char ** err )
extern

◆ SaveEXRToMemory()

int SaveEXRToMemory ( const float * data,
const int width,
const int height,
const int components,
const int save_as_fp16,
unsigned char ** buffer,
const char ** err )
extern