56 printf(
"DPX/Cineon: error opening image.\n");
78 ibuf->
ftype = use_cineon ? IMB_FTYPE_CINEON : IMB_FTYPE_DPX;
92 unsigned char *rect_ptr;
93 int x,
y, depth, bitspersample, rvalue;
96 printf(
"DPX/Cineon: saving in memory is not supported.\n");
102 depth = (ibuf->
planes + 7) >> 3;
103 if (depth > 4 || depth < 3) {
104 printf(
"DPX/Cineon: unsupported depth: %d for file: '%s'\n", depth, filename);
133 if (logImage ==
NULL) {
134 printf(
"DPX/Cineon: error creating file.\n");
142 fbuf = (
float *)
MEM_mallocN(
sizeof(
float[4]) * ibuf->
x * ibuf->
y,
143 "fbuf in imb_save_dpx_cineon");
145 for (
y = 0;
y < ibuf->
y;
y++) {
146 float *dst_ptr = fbuf + 4 * ((ibuf->
y -
y - 1) * ibuf->
x);
149 memcpy(dst_ptr, src_ptr, 4 * ibuf->
x *
sizeof(
float));
161 fbuf = (
float *)
MEM_mallocN(
sizeof(
float[4]) * ibuf->
x * ibuf->
y,
162 "fbuf in imb_save_dpx_cineon");
164 printf(
"DPX/Cineon: error allocating memory.\n");
168 for (
y = 0;
y < ibuf->
y;
y++) {
169 for (
x = 0;
x < ibuf->
x;
x++) {
170 fbuf_ptr = fbuf + 4 * ((ibuf->
y -
y - 1) * ibuf->
x +
x);
171 rect_ptr = (
unsigned char *)ibuf->
rect + 4 * (
y * ibuf->
x +
x);
172 fbuf_ptr[0] = (
float)rect_ptr[0] / 255.0f;
173 fbuf_ptr[1] = (
float)rect_ptr[1] / 255.0f;
174 fbuf_ptr[2] = (
float)rect_ptr[2] / 255.0f;
175 fbuf_ptr[3] = (depth == 4) ? ((
float)rect_ptr[3] / 255.0f) : 1.0f;
typedef float(TangentPoint)[2]
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
@ COLOR_ROLE_DEFAULT_FLOAT
struct ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_rect_from_float(struct ImBuf *ibuf)
void IMB_freeImBuf(struct ImBuf *ibuf)
void IMB_flipy(struct ImBuf *ibuf)
Contains defines and structs used throughout the imbuf module.
Read Guarded memory(de)allocation.
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags)
ImBuf * imb_load_dpx(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE])
bool imb_is_a_cineon(const unsigned char *buf, size_t size)
static struct ImBuf * imb_load_dpx_cineon(const unsigned char *mem, size_t size, int use_cineon, int flags, char colorspace[IM_MAX_SPACE])
bool imb_is_a_dpx(const unsigned char *buf, size_t size)
bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags)
ImBuf * imb_load_cineon(const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE])
static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filename, int use_cineon, int flags)
void colorspace_set_default_role(char *colorspace, int size, int role)
LogImageFile * logImageCreate(const char *filename, int cineon, int width, int height, int bitsPerSample, int isLogarithmic, int hasAlpha, int referenceWhite, int referenceBlack, float gamma, const char *creator)
void logImageSetVerbose(int verbosity)
int logImageIsCineon(const void *buffer, const unsigned int size)
LogImageFile * logImageOpenFromMemory(const unsigned char *buffer, unsigned int size)
void logImageClose(LogImageFile *logImage)
int logImageIsDpx(const void *buffer, const unsigned int size)
void logImageGetSize(LogImageFile *logImage, int *width, int *height, int *depth)
int logImageSetDataRGBA(LogImageFile *logImage, float *data, int dataIsLinearRGB)
int logImageGetDataRGBA(LogImageFile *logImage, float *data, int dataIsLinearRGB)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
ImbFormatOptions foptions