Blender
V3.3
|
#include "MEM_guardedalloc.h"
#include "BLI_fileops.h"
#include "BLI_utildefines.h"
#include "imbuf.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_allocimbuf.h"
#include "IMB_filetype.h"
#include "IMB_colormanagement.h"
#include "IMB_colormanagement_intern.h"
Go to the source code of this file.
Macros | |
#define | MINELEN 8 |
#define | MAXELEN 0x7fff |
#define | MINRUN 4 /* minimum run length */ |
#define | RED 0 |
#define | GRN 1 |
#define | BLU 2 |
#define | EXP 3 |
#define | COLXS 128 |
#define | COPY_RGBE(c1, c2) (c2[RED] = c1[RED], c2[GRN] = c1[GRN], c2[BLU] = c1[BLU], c2[EXP] = c1[EXP]) |
Typedefs | |
typedef unsigned char | RGBE[4] |
typedef float | fCOLOR[3] |
Functions | |
static const unsigned char * | oldreadcolrs (RGBE *scan, const unsigned char *mem, int xmax, const unsigned char *mem_eof) |
static const unsigned char * | freadcolrs (RGBE *scan, const unsigned char *mem, int xmax, const unsigned char *mem_eof) |
static void | RGBE2FLOAT (RGBE rgbe, fCOLOR fcol) |
static void | FLOAT2RGBE (const fCOLOR fcol, RGBE rgbe) |
bool | imb_is_a_hdr (const unsigned char *buf, const size_t size) |
struct ImBuf * | imb_loadhdr (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
static int | fwritecolrs (FILE *file, int width, int channels, const unsigned char *ibufscan, const float *fpscan) |
static void | writeHeader (FILE *file, int width, int height) |
bool | imb_savehdr (struct ImBuf *ibuf, const char *filepath, int flags) |
Radiance High Dynamic Range image file IO For description and code for reading/writing of radiance hdr files by Greg Ward, refer to: http://radsite.lbl.gov/radiance/refer/Notes/picture_format.html
Definition in file radiance_hdr.c.
#define BLU 2 |
Definition at line 33 of file radiance_hdr.c.
#define COLXS 128 |
Definition at line 35 of file radiance_hdr.c.
#define COPY_RGBE | ( | c1, | |
c2 | |||
) | (c2[RED] = c1[RED], c2[GRN] = c1[GRN], c2[BLU] = c1[BLU], c2[EXP] = c1[EXP]) |
Definition at line 40 of file radiance_hdr.c.
#define EXP 3 |
Definition at line 34 of file radiance_hdr.c.
#define GRN 1 |
Definition at line 32 of file radiance_hdr.c.
#define MAXELEN 0x7fff |
Definition at line 29 of file radiance_hdr.c.
#define MINELEN 8 |
Definition at line 28 of file radiance_hdr.c.
Definition at line 30 of file radiance_hdr.c.
#define RED 0 |
Definition at line 31 of file radiance_hdr.c.
typedef float fCOLOR[3] |
Definition at line 37 of file radiance_hdr.c.
typedef unsigned char RGBE[4] |
Definition at line 36 of file radiance_hdr.c.
Definition at line 158 of file radiance_hdr.c.
References BLU, COLXS, e, EXP, float(), GRN, and RED.
Referenced by fwritecolrs().
|
static |
Definition at line 75 of file radiance_hdr.c.
References BLU, EXP, GRN, MAXELEN, MINELEN, NULL, oldreadcolrs(), RED, and UNLIKELY.
Referenced by imb_loadhdr().
|
static |
Definition at line 308 of file radiance_hdr.c.
References BLU, channels(), COPY_RGBE, count, file, float(), FLOAT2RGBE(), GRN, MAXELEN, MEM_freeN, MEM_mallocN, MINELEN, MINRUN, NULL, RED, UNLIKELY, width, and x.
Referenced by imb_savehdr().
bool imb_is_a_hdr | ( | const unsigned char * | buf, |
const size_t | size | ||
) |
Definition at line 179 of file radiance_hdr.c.
References magic(), and size().
Referenced by imb_loadhdr().
struct ImBuf* imb_loadhdr | ( | const unsigned char * | mem, |
size_t | size, | ||
int | flags, | ||
char | colorspace[IM_MAX_SPACE] | ||
) |
Definition at line 197 of file radiance_hdr.c.
References BLU, COLOR_ROLE_DEFAULT_FLOAT, colorspace_set_default_role(), ImBuf::flags, freadcolrs(), ImBuf::ftype, GRN, height, IB_alphamode_detect, IB_alphamode_premul, IB_rect, IB_rectfloat, IB_test, IM_MAX_SPACE, IMB_allocImBuf(), IMB_flipy(), imb_is_a_hdr(), IMB_rect_from_float(), MEM_freeN, MEM_mallocN, MIN2, NULL, ptr, ImBuf::rect_float, RED, RGBE2FLOAT(), size(), UNLIKELY, width, x, and y.
Definition at line 409 of file radiance_hdr.c.
References BLI_fopen(), ImBuf::channels, file, ImBuf::flags, fwritecolrs(), height, NULL, ImBuf::rect, ImBuf::rect_float, void, width, writeHeader(), ImBuf::x, y, and ImBuf::y.
|
static |
Definition at line 144 of file radiance_hdr.c.
References BLU, COLXS, EXP, GRN, and RED.
Referenced by imb_loadhdr().
|
static |
Definition at line 394 of file radiance_hdr.c.
References file, height, and width.
Referenced by imb_savehdr().