Blender V2.61 - r43446
Classes | Typedefs | Functions | Variables

openexr_api.cpp File Reference

#include <stdlib.h>
#include <stdio.h>
#include <stddef.h>
#include <string>
#include <openexr_api.h>
#include "MEM_guardedalloc.h"
#include "BLI_blenlib.h"
#include "BLI_math_color.h"
#include "IMB_imbuf_types.h"
#include "IMB_imbuf.h"
#include "IMB_allocimbuf.h"
#include "IMB_metadata.h"
#include "openexr_multi.h"
#include <iostream>
#include <half.h>
#include <ImfVersion.h>
#include <ImathBox.h>
#include <ImfArray.h>
#include <ImfIO.h>
#include <ImfChannelList.h>
#include <ImfPixelType.h>
#include <ImfInputFile.h>
#include <ImfOutputFile.h>
#include <ImfCompression.h>
#include <ImfCompressionAttribute.h>
#include <ImfStringAttribute.h>

Go to the source code of this file.

Classes

class  Mem_IStream
struct  _RGBAZ
struct  ExrHandle
struct  ExrChannel
struct  ExrPass
struct  ExrLayer
struct  RGBA

Typedefs

typedef struct _RGBAZ RGBAZ
typedef struct ExrHandle ExrHandle
typedef struct ExrChannel ExrChannel
typedef struct ExrPass ExrPass
typedef struct ExrLayer ExrLayer
typedef struct RGBA RGBA

Functions

int imb_is_a_openexr (unsigned char *mem)
static void openexr_header_compression (Header *header, int compression)
static void openexr_header_metadata (Header *header, struct ImBuf *ibuf)
static int imb_save_openexr_half (struct ImBuf *ibuf, const char *name, int flags)
static int imb_save_openexr_float (struct ImBuf *ibuf, const char *name, int flags)
int imb_save_openexr (struct ImBuf *ibuf, const char *name, int flags)
void * IMB_exr_get_handle (void)
void IMB_exr_add_channel (void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect)
int IMB_exr_begin_write (void *handle, const char *filename, int width, int height, int compress)
void IMB_exrtile_begin_write (void *handle, const char *filename, int mipmap, int width, int height, int tilex, int tiley)
int IMB_exr_begin_read (void *handle, const char *filename, int *width, int *height)
void IMB_exr_set_channel (void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect)
void IMB_exrtile_clear_channels (void *handle)
void IMB_exrtile_write_channels (void *handle, int partx, int party, int level)
void IMB_exr_write_channels (void *handle)
void IMB_exr_read_channels (void *handle)
void IMB_exr_multilayer_convert (void *handle, void *base, void *(*addlayer)(void *base, char *str), void(*addpass)(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id))
void IMB_exr_close (void *handle)
static int imb_exr_split_channel_name (ExrChannel *echan, char *layname, char *passname)
static ExrLayerimb_exr_get_layer (ListBase *lb, char *layname)
static ExrPassimb_exr_get_pass (ListBase *lb, char *passname)
static ExrHandleimb_exr_begin_read_mem (InputFile *file, int width, int height)
static void exr_print_filecontents (InputFile *file)
static const char * exr_rgba_channelname (InputFile *file, const char *chan)
static int exr_has_zbuffer (InputFile *file)
static int exr_is_renderresult (InputFile *file)
struct ImBufimb_load_openexr (unsigned char *mem, size_t size, int flags)

Variables

static ListBase exrhandles = {NULL, NULL}

Detailed Description

Definition in file openexr_api.cpp.


Typedef Documentation

typedef struct ExrChannel ExrChannel
typedef struct ExrHandle ExrHandle
typedef struct ExrLayer ExrLayer
typedef struct ExrPass ExrPass
typedef struct RGBA RGBA
typedef struct _RGBAZ RGBAZ

Definition at line 151 of file openexr_api.cpp.


Function Documentation

static int exr_has_zbuffer ( InputFile *  file) [static]

Definition at line 959 of file openexr_api.cpp.

References NULL.

Referenced by imb_load_openexr().

static int exr_is_renderresult ( InputFile *  file) [static]

Definition at line 964 of file openexr_api.cpp.

Referenced by imb_load_openexr().

static void exr_print_filecontents ( InputFile *  file) [static]

Definition at line 927 of file openexr_api.cpp.

References i.

Referenced by imb_load_openexr().

static const char* exr_rgba_channelname ( InputFile *  file,
const char *  chan 
) [static]

Definition at line 939 of file openexr_api.cpp.

References BLI_strcasecmp(), i, len(), str, and strlen().

Referenced by imb_load_openexr().

void IMB_exr_add_channel ( void *  handle,
const char *  layname,
const char *  passname,
int  xstride,
int  ystride,
float *  rect 
)
int IMB_exr_begin_read ( void *  handle,
const char *  filename,
int *  width,
int *  height 
)
static ExrHandle* imb_exr_begin_read_mem ( InputFile *  file,
int  width,
int  height 
) [static]
int IMB_exr_begin_write ( void *  handle,
const char *  filename,
int  width,
int  height,
int  compress 
)
void IMB_exr_close ( void *  handle)
void* IMB_exr_get_handle ( void  )
static ExrLayer* imb_exr_get_layer ( ListBase lb,
char *  layname 
) [static]
static ExrPass* imb_exr_get_pass ( ListBase lb,
char *  passname 
) [static]
void IMB_exr_multilayer_convert ( void *  handle,
void *  base,
void *(*)(void *base, char *str addlayer,
void(*)(void *base, void *lay, char *str, float *rect, int totchan, char *chan_id)  addpass 
)
void IMB_exr_read_channels ( void *  handle)
void IMB_exr_set_channel ( void *  handle,
const char *  layname,
const char *  passname,
int  xstride,
int  ystride,
float *  rect 
)
static int imb_exr_split_channel_name ( ExrChannel echan,
char *  layname,
char *  passname 
) [static]
void IMB_exr_write_channels ( void *  handle)
void IMB_exrtile_begin_write ( void *  handle,
const char *  filename,
int  mipmap,
int  width,
int  height,
int  tilex,
int  tiley 
)
void IMB_exrtile_clear_channels ( void *  handle)

Definition at line 595 of file openexr_api.cpp.

References BLI_freelistN(), ExrHandle::channels, and data.

Referenced by save_empty_result_tiles().

void IMB_exrtile_write_channels ( void *  handle,
int  partx,
int  party,
int  level 
)
int imb_is_a_openexr ( unsigned char *  mem)

Test presence of OpenEXR file.

Parameters:
mempointer to loaded OpenEXR bitstream

Definition at line 156 of file openexr_api.cpp.

Referenced by imb_load_openexr().

struct ImBuf* imb_load_openexr ( unsigned char *  mem,
size_t  size,
int  flags 
) [read]
int imb_save_openexr ( struct ImBuf ibuf,
const char *  name,
int  flags 
)
static int imb_save_openexr_float ( struct ImBuf ibuf,
const char *  name,
int  flags 
) [static]
static int imb_save_openexr_half ( struct ImBuf ibuf,
const char *  name,
int  flags 
) [static]
static void openexr_header_compression ( Header header,
int  compression 
) [static]
static void openexr_header_metadata ( Header header,
struct ImBuf ibuf 
) [static]

Variable Documentation

ListBase exrhandles = {NULL, NULL} [static]

Definition at line 410 of file openexr_api.cpp.

Referenced by IMB_exr_close(), and IMB_exr_get_handle().