Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
imageio_rgbe.c File Reference
#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:

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)
 

Macro Definition Documentation

◆ RGBE_DATA_BLUE

#define RGBE_DATA_BLUE   2

◆ RGBE_DATA_GREEN

#define RGBE_DATA_GREEN   1

◆ RGBE_DATA_RED

#define RGBE_DATA_RED   0

◆ RGBE_DATA_SIZE

#define RGBE_DATA_SIZE   3

◆ RGBE_RETURN_FAILURE

#define RGBE_RETURN_FAILURE   -1

◆ RGBE_RETURN_SUCCESS

#define RGBE_RETURN_SUCCESS   0

◆ RGBE_VALID_EXPOSURE

#define RGBE_VALID_EXPOSURE   0x04

◆ RGBE_VALID_GAMMA

#define RGBE_VALID_GAMMA   0x02

◆ RGBE_VALID_PROGRAMTYPE

#define RGBE_VALID_PROGRAMTYPE   0x01

Enumeration Type Documentation

◆ rgbe_error_codes

Enumerator
rgbe_read_error 
rgbe_write_error 
rgbe_format_error 
rgbe_memory_error 

Function Documentation

◆ _xy2matrix()

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] 
)
static

Referenced by dt_imageio_open_rgbe().

◆ dt_imageio_open_rgbe()

◆ rgbe2float()

static void rgbe2float ( float *  red,
float *  green,
float *  blue,
unsigned char  rgbe[4] 
)
static

References f().

Referenced by RGBE_ReadPixels(), and RGBE_ReadPixels_RLE().

◆ rgbe_error()

static int rgbe_error ( int  rgbe_error_code,
char *  msg 
)
static

◆ RGBE_ReadHeader()

◆ RGBE_ReadPixels()

int RGBE_ReadPixels ( FILE *  fp,
float *  data,
int  numpixels 
)

◆ RGBE_ReadPixels_RLE()

int RGBE_ReadPixels_RLE ( FILE *  fp,
float *  data,
int  scanline_width,
int  num_scanlines 
)