41 printf(
"DPX/Cineon: error opening image.\n");
63 ibuf->
ftype = use_cineon ? IMB_FTYPE_CINEON : IMB_FTYPE_DPX;
77 unsigned char *rect_ptr;
78 int x,
y, depth, bitspersample, rvalue;
81 printf(
"DPX/Cineon: saving in memory is not supported.\n");
87 depth = (ibuf->
planes + 7) >> 3;
88 if (depth > 4 || depth < 3) {
89 printf(
"DPX/Cineon: unsupported depth: %d for file: '%s'\n", depth, filepath);
118 if (logImage ==
NULL) {
119 printf(
"DPX/Cineon: error creating file.\n");
127 fbuf = (
float *)
MEM_mallocN(
sizeof(
float[4]) * ibuf->
x * ibuf->
y,
128 "fbuf in imb_save_dpx_cineon");
130 for (
y = 0;
y < ibuf->
y;
y++) {
131 float *dst_ptr = fbuf + 4 * ((ibuf->
y -
y - 1) * ibuf->
x);
134 memcpy(dst_ptr, src_ptr, 4 * ibuf->
x *
sizeof(
float));
146 fbuf = (
float *)
MEM_mallocN(
sizeof(
float[4]) * ibuf->
x * ibuf->
y,
147 "fbuf in imb_save_dpx_cineon");
149 printf(
"DPX/Cineon: error allocating memory.\n");
153 for (
y = 0;
y < ibuf->
y;
y++) {
154 for (
x = 0;
x < ibuf->
x;
x++) {
155 fbuf_ptr = fbuf + 4 * ((ibuf->
y -
y - 1) * ibuf->
x +
x);
156 rect_ptr = (
unsigned char *)ibuf->
rect + 4 * (
y * ibuf->
x +
x);
157 fbuf_ptr[0] = (
float)rect_ptr[0] / 255.0f;
158 fbuf_ptr[1] = (
float)rect_ptr[1] / 255.0f;
159 fbuf_ptr[2] = (
float)rect_ptr[2] / 255.0f;
160 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 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
_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
@ 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_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)
static int imb_save_dpx_cineon(ImBuf *ibuf, const char *filepath, int use_cineon, int flags)
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])
void colorspace_set_default_role(char *colorspace, int size, int role)
depth_tx normal_tx diffuse_light_tx specular_light_tx volume_light_tx environment_tx ambient_occlusion_tx aov_value_tx in_weight_img image(1, GPU_R32F, Qualifier::WRITE, ImageType::FLOAT_2D_ARRAY, "out_weight_img") .image(3
void IMB_freeImBuf(ImBuf *UNUSED(ibuf))
LogImageFile * logImageCreate(const char *filepath, 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