![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/imageio_rgbe.h"#include "develop/imageop.h"#include <ctype.h>#include <math.h>#include <stdio.h>#include <stdlib.h>#include <string.h>
Include dependency graph for imageio_rgbe.c:Go to the source code of this file.
Data Structures | |
| struct | rgbe_header_info |
Macros | |
| #define | RGBE_VALID_PROGRAMTYPE 0x01 |
| #define | RGBE_VALID_GAMMA 0x02 |
| #define | RGBE_VALID_EXPOSURE 0x04 |
| #define | RGBE_RETURN_SUCCESS 0 |
| #define | RGBE_RETURN_FAILURE -1 |
| #define | RGBE_DATA_RED 0 |
| #define | RGBE_DATA_GREEN 1 |
| #define | RGBE_DATA_BLUE 2 |
| #define | RGBE_DATA_SIZE 3 |
Enumerations | |
| enum | rgbe_error_codes { rgbe_read_error , rgbe_write_error , rgbe_format_error , rgbe_memory_error } |
Functions | |
| static int | rgbe_error (int rgbe_error_code, char *msg) |
| static void | rgbe2float (float *red, float *green, float *blue, unsigned char rgbe[4]) |
| int | RGBE_ReadHeader (FILE *fp, int *width, int *height, rgbe_header_info *info) |
| int | RGBE_ReadPixels (FILE *fp, float *data, int numpixels) |
| int | RGBE_ReadPixels_RLE (FILE *fp, float *data, int scanline_width, int num_scanlines) |
| static void | _xy2matrix (const float r[2], const float g[2], const float b[2], const float w[2], const float Y, float M[4][4]) |
| dt_imageio_retval_t | dt_imageio_open_rgbe (dt_image_t *img, const char *filename, dt_mipmap_buffer_t *mbuf) |
| #define RGBE_DATA_BLUE 2 |
Definition at line 72 of file imageio_rgbe.c.
| #define RGBE_DATA_GREEN 1 |
Definition at line 71 of file imageio_rgbe.c.
| #define RGBE_DATA_RED 0 |
Definition at line 70 of file imageio_rgbe.c.
| #define RGBE_DATA_SIZE 3 |
Definition at line 74 of file imageio_rgbe.c.
| #define RGBE_RETURN_FAILURE -1 |
Definition at line 68 of file imageio_rgbe.c.
| #define RGBE_RETURN_SUCCESS 0 |
Definition at line 67 of file imageio_rgbe.c.
| #define RGBE_VALID_EXPOSURE 0x04 |
Definition at line 64 of file imageio_rgbe.c.
| #define RGBE_VALID_GAMMA 0x02 |
Definition at line 63 of file imageio_rgbe.c.
| #define RGBE_VALID_PROGRAMTYPE 0x01 |
Definition at line 62 of file imageio_rgbe.c.
| enum rgbe_error_codes |
| Enumerator | |
|---|---|
| rgbe_read_error | |
| rgbe_write_error | |
| rgbe_format_error | |
| rgbe_memory_error | |
Definition at line 76 of file imageio_rgbe.c.
|
static |
Definition at line 557 of file imageio_rgbe.c.
Referenced by dt_imageio_open_rgbe().
| dt_imageio_retval_t dt_imageio_open_rgbe | ( | dt_image_t * | img, |
| const char * | filename, | ||
| dt_mipmap_buffer_t * | mbuf | ||
| ) |
Definition at line 601 of file imageio_rgbe.c.
References _xy2matrix(), dt_iop_buffer_dsc_t::bpp, dt_iop_buffer_dsc_t::channels, dt_iop_buffer_dsc_t::cst, dt_image_t::d65_color_matrix, dt_iop_buffer_dsc_t::datatype, dt_image_t::dsc, DT_IMAGE_HDR, DT_IMAGEIO_CACHE_FULL, DT_IMAGEIO_FILE_CORRUPTED, DT_IMAGEIO_OK, dt_mipmap_cache_alloc(), f, dt_iop_buffer_dsc_t::filters, dt_image_t::flags, dt_image_t::height, i, IOP_CS_RGB, IS_NULL_PTR, dt_image_t::loader, LOADER_RGBE, m, mat3inv(), rgbe_header_info::primaries, RGBE_ReadHeader(), RGBE_ReadPixels_RLE(), TYPE_FLOAT, and dt_image_t::width.
Referenced by dt_imageio_open_hdr().
|
static |
Definition at line 135 of file imageio_rgbe.c.
References f.
Referenced by RGBE_ReadPixels(), and RGBE_ReadPixels_RLE().
|
static |
Definition at line 85 of file imageio_rgbe.c.
References rgbe_format_error, rgbe_memory_error, rgbe_read_error, RGBE_RETURN_FAILURE, and rgbe_write_error.
Referenced by RGBE_ReadHeader(), RGBE_ReadPixels(), and RGBE_ReadPixels_RLE().
| int RGBE_ReadHeader | ( | FILE * | fp, |
| int * | width, | ||
| int * | height, | ||
| rgbe_header_info * | info | ||
| ) |
Definition at line 178 of file imageio_rgbe.c.
References rgbe_header_info::exposure, FALSE, rgbe_header_info::gamma, height, i, rgbe_header_info::primaries, rgbe_header_info::programtype, rgbe_error(), rgbe_format_error, rgbe_read_error, RGBE_RETURN_SUCCESS, RGBE_VALID_EXPOSURE, RGBE_VALID_GAMMA, RGBE_VALID_PROGRAMTYPE, TRUE, rgbe_header_info::valid, and width.
Referenced by dt_imageio_open_rgbe().
| int RGBE_ReadPixels | ( | FILE * | fp, |
| float * | data, | ||
| int | numpixels | ||
| ) |
Definition at line 288 of file imageio_rgbe.c.
References rgbe2float(), RGBE_DATA_BLUE, RGBE_DATA_GREEN, RGBE_DATA_RED, RGBE_DATA_SIZE, rgbe_error(), rgbe_read_error, and RGBE_RETURN_SUCCESS.
Referenced by RGBE_ReadPixels_RLE().
| int RGBE_ReadPixels_RLE | ( | FILE * | fp, |
| float * | data, | ||
| int | scanline_width, | ||
| int | num_scanlines | ||
| ) |
Definition at line 416 of file imageio_rgbe.c.
References dt_free, i, IS_NULL_PTR, rgbe2float(), RGBE_DATA_BLUE, RGBE_DATA_GREEN, RGBE_DATA_RED, RGBE_DATA_SIZE, rgbe_error(), rgbe_format_error, rgbe_memory_error, rgbe_read_error, RGBE_ReadPixels(), and RGBE_RETURN_SUCCESS.
Referenced by dt_imageio_open_rgbe().