Blender V4.5
conversion.cc File Reference
#include "BLI_rect.h"
#include "BLI_task.hh"
#include "IMB_filter.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "IMB_colormanagement.hh"
#include "IMB_colormanagement_intern.hh"
#include "MEM_guardedalloc.h"
#include "OCIO_colorspace.hh"

Go to the source code of this file.

Macros

#define USHORTTOFLOAT(val)

Functions

Generic Buffer Conversion
MINLINE void ushort_to_byte_v4 (uchar b[4], const ushort us[4])
MINLINE uchar ftochar (float value)
MINLINE void ushort_to_byte_dither_v4 (uchar b[4], const ushort us[4], float dither, int x, int y)
MINLINE void float_to_byte_dither_v4 (uchar b[4], const float f[4], float dither, int x, int y)
bool IMB_alpha_affects_rgb (const ImBuf *ibuf)
void IMB_buffer_byte_from_float (uchar *rect_to, const float *rect_from, int channels_from, float dither, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from, int start_y)
void IMB_buffer_byte_from_float_mask (uchar *rect_to, const float *rect_from, int channels_from, float dither, bool predivide, int width, int height, int stride_to, int stride_from, char *mask)
void IMB_buffer_float_from_byte (float *rect_to, const uchar *rect_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_from_float (float *rect_to, const float *rect_from, int channels_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_from_float_threaded (float *rect_to, const float *rect_from, int channels_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
void IMB_buffer_float_from_float_mask (float *rect_to, const float *rect_from, int channels_from, int width, int height, int stride_to, int stride_from, char *mask)
void IMB_buffer_byte_from_byte (uchar *rect_to, const uchar *rect_from, int profile_to, int profile_from, bool predivide, int width, int height, int stride_to, int stride_from)
ImBuf Conversion
void IMB_byte_from_float (ImBuf *ibuf)
void IMB_float_from_byte_ex (ImBuf *dst, const ImBuf *src, const rcti *region_to_update)
void IMB_float_from_byte (ImBuf *ibuf)
Color to Gray-Scale
void IMB_color_to_bw (ImBuf *ibuf)
Alter Saturation
void IMB_saturation (ImBuf *ibuf, float sat)

Macro Definition Documentation

◆ USHORTTOFLOAT

#define USHORTTOFLOAT ( val)
Value:
(float(val) / 65535.0f)

Referenced by ushort_to_byte_dither_v4().

Function Documentation

◆ float_to_byte_dither_v4()

MINLINE void float_to_byte_dither_v4 ( uchar b[4],
const float f[4],
float dither,
int x,
int y )

◆ ftochar()

MINLINE uchar ftochar ( float value)

Definition at line 37 of file conversion.cc.

References MINLINE, and unit_float_to_uchar_clamp().

Referenced by float_to_byte_dither_v4(), and ushort_to_byte_dither_v4().

◆ IMB_alpha_affects_rgb()

◆ IMB_buffer_byte_from_byte()

void IMB_buffer_byte_from_byte ( unsigned char * rect_to,
const unsigned char * rect_from,
int profile_to,
int profile_from,
bool predivide,
int width,
int height,
int stride_to,
int stride_from )

◆ IMB_buffer_byte_from_float()

◆ IMB_buffer_byte_from_float_mask()

void IMB_buffer_byte_from_float_mask ( unsigned char * rect_to,
const float * rect_from,
int channels_from,
float dither,
bool predivide,
int width,
int height,
int stride_to,
int stride_from,
char * mask )

◆ IMB_buffer_float_from_byte()

void IMB_buffer_float_from_byte ( float * rect_to,
const unsigned char * rect_from,
int profile_to,
int profile_from,
bool predivide,
int width,
int height,
int stride_to,
int stride_from )

◆ IMB_buffer_float_from_float()

void IMB_buffer_float_from_float ( float * rect_to,
const float * rect_from,
int channels_from,
int profile_to,
int profile_from,
bool predivide,
int width,
int height,
int stride_to,
int stride_from )

◆ IMB_buffer_float_from_float_mask()

void IMB_buffer_float_from_float_mask ( float * rect_to,
const float * rect_from,
int channels_from,
int width,
int height,
int stride_to,
int stride_from,
char * mask )

Float to float pixels, output 4-channel RGBA.

Definition at line 482 of file conversion.cc.

References copy_v3_v3(), copy_v4_v4(), FILTER_MASK_USED, mask(), x, and y.

Referenced by blender::ed::object::write_internal_bake_pixels().

◆ IMB_buffer_float_from_float_threaded()

void IMB_buffer_float_from_float_threaded ( float * rect_to,
const float * rect_from,
int channels_from,
int profile_to,
int profile_from,
bool predivide,
int width,
int height,
int stride_to,
int stride_from )

◆ IMB_byte_from_float()

◆ IMB_color_to_bw()

◆ IMB_float_from_byte()

◆ IMB_float_from_byte_ex()

◆ IMB_saturation()

◆ ushort_to_byte_dither_v4()

MINLINE void ushort_to_byte_dither_v4 ( uchar b[4],
const ushort us[4],
float dither,
int x,
int y )

◆ ushort_to_byte_v4()

MINLINE void ushort_to_byte_v4 ( uchar b[4],
const ushort us[4] )

Definition at line 29 of file conversion.cc.

References b, MINLINE, and unit_ushort_to_uchar().

Referenced by IMB_buffer_byte_from_float().