Blender V4.5
blender::imbuf Namespace Reference

Namespaces

namespace  tests
namespace  transform

Classes

class  ImBufMemWriter
struct  ReadContext
struct  WriteContext

Functions

uchar4 interpolate_nearest_border_byte (const ImBuf *in, float u, float v)
float4 interpolate_nearest_border_fl (const ImBuf *in, float u, float v)
void interpolate_nearest_border_byte (const ImBuf *in, uchar output[4], float u, float v)
void interpolate_nearest_border_fl (const ImBuf *in, float output[4], float u, float v)
uchar4 interpolate_nearest_wrap_byte (const ImBuf *in, float u, float v)
float4 interpolate_nearest_wrap_fl (const ImBuf *in, float u, float v)
uchar4 interpolate_bilinear_byte (const ImBuf *in, float u, float v)
float4 interpolate_bilinear_fl (const ImBuf *in, float u, float v)
void interpolate_bilinear_byte (const ImBuf *in, uchar output[4], float u, float v)
void interpolate_bilinear_fl (const ImBuf *in, float output[4], float u, float v)
uchar4 interpolate_bilinear_border_byte (const ImBuf *in, float u, float v)
float4 interpolate_bilinear_border_fl (const ImBuf *in, float u, float v)
void interpolate_bilinear_border_byte (const ImBuf *in, uchar output[4], float u, float v)
void interpolate_bilinear_border_fl (const ImBuf *in, float output[4], float u, float v)
uchar4 interpolate_bilinear_wrap_byte (const ImBuf *in, float u, float v)
float4 interpolate_bilinear_wrap_fl (const ImBuf *in, float u, float v)
uchar4 interpolate_cubic_bspline_byte (const ImBuf *in, float u, float v)
float4 interpolate_cubic_bspline_fl (const ImBuf *in, float u, float v)
void interpolate_cubic_bspline_byte (const ImBuf *in, uchar output[4], float u, float v)
void interpolate_cubic_bspline_fl (const ImBuf *in, float output[4], float u, float v)
uchar4 interpolate_cubic_mitchell_byte (const ImBuf *in, float u, float v)
void interpolate_cubic_mitchell_byte (const ImBuf *in, uchar output[4], float u, float v)
template<typename T>
static void fill_all_channels (T *pixels, int width, int height, int components, T alpha)
template<typename T>
static ImBufload_pixels (ImageInput *in, int width, int height, int channels, int flags, bool use_all_planes)
static void set_file_colorspace (ImFileColorSpace &r_colorspace, const ReadContext &ctx, const ImageSpec &spec, bool is_float)
static ImBufget_oiio_ibuf (ImageInput *in, const ReadContext &ctx, ImFileColorSpace &r_colorspace)
static unique_ptr< ImageInput > get_oiio_reader (const char *formatformat, const ImageSpec &config, Filesystem::IOMemReader &mem_reader, ImageSpec &r_newspec)
bool imb_oiio_check (const uchar *mem, size_t mem_size, const char *file_format)
ImBufimb_oiio_read (const ReadContext &ctx, const ImageSpec &config, ImFileColorSpace &r_colorspace, ImageSpec &r_newspec)
bool imb_oiio_write (const WriteContext &ctx, const char *filepath, const ImageSpec &file_spec)
WriteContext imb_create_write_context (const char *file_format, ImBuf *ibuf, int flags, bool prefer_float)
ImageSpec imb_create_write_spec (const WriteContext &ctx, int file_channels, TypeDesc data_format)
ImBufimb_oiio_read (const ReadContext &ctx, const OIIO::ImageSpec &config, ImFileColorSpace &r_colorspace, OIIO::ImageSpec &r_newspec)
bool imb_oiio_write (const WriteContext &ctx, const char *filepath, const OIIO::ImageSpec &file_spec)
OIIO::ImageSpec imb_create_write_spec (const WriteContext &ctx, int file_channels, OIIO::TypeDesc data_format)

Function Documentation

◆ fill_all_channels()

template<typename T>
void blender::imbuf::fill_all_channels ( T * pixels,
int width,
int height,
int components,
T alpha )
static

Definition at line 75 of file openimageio_support.cc.

References fill_all_channels(), i, and T.

Referenced by fill_all_channels(), and load_pixels().

◆ get_oiio_ibuf()

◆ get_oiio_reader()

unique_ptr< ImageInput > blender::imbuf::get_oiio_reader ( const char * format,
const ImageSpec & config,
Filesystem::IOMemReader & mem_reader,
ImageSpec & r_newspec )
static

Returns an #ImageInput for the precise format requested using the provided #IOMemReader. If successful, the #ImageInput will be opened and ready for operations. Null will be returned if the format was not found or if the open call fails.

Definition at line 235 of file openimageio_support.cc.

References get_oiio_reader(), and in.

Referenced by get_oiio_reader(), and imb_oiio_read().

◆ imb_create_write_context()

WriteContext blender::imbuf::imb_create_write_context ( const char * file_format,
ImBuf * ibuf,
int flags,
bool prefer_float = true )

◆ imb_create_write_spec() [1/2]

OIIO::ImageSpec blender::imbuf::imb_create_write_spec ( const WriteContext & ctx,
int file_channels,
OIIO::TypeDesc data_format )

Returns an #ImageSpec filled in with all common attributes associated with the ImBuf provided as part of the WriteContext.

This includes optional metadata that has been attached to the ImBuf and which should be written to the new file as necessary.

References imb_create_write_spec().

◆ imb_create_write_spec() [2/2]

◆ imb_oiio_check()

bool blender::imbuf::imb_oiio_check ( const uchar * mem,
size_t mem_size,
const char * file_format )

Check to see if we can load and open the given file format.

Definition at line 256 of file openimageio_support.cc.

References imb_oiio_check(), and in.

Referenced by imb_is_a_bmp(), imb_is_a_dds(), imb_is_a_dpx(), imb_is_a_hdr(), imb_is_a_png(), imb_is_a_psd(), imb_is_a_tga(), imb_is_a_tiff(), and imb_oiio_check().

◆ imb_oiio_read() [1/2]

◆ imb_oiio_read() [2/2]

ImBuf * blender::imbuf::imb_oiio_read ( const ReadContext & ctx,
const OIIO::ImageSpec & config,
ImFileColorSpace & r_colorspace,
OIIO::ImageSpec & r_newspec )

The primary method for reading data into an ImBuf.

During the IB_test phase of loading, the colorspace parameter will be populated with the appropriate colorspace name.

Upon return, the r_newspec parameter will contain image format information which can be inspected afterwards if necessary.

References imb_oiio_read().

◆ imb_oiio_write() [1/2]

◆ imb_oiio_write() [2/2]

bool blender::imbuf::imb_oiio_write ( const WriteContext & ctx,
const char * filepath,
const OIIO::ImageSpec & file_spec )

The primary method for writing data from an ImBuf to either a physical or in-memory destination.

The file_spec parameter will typically come from imb_create_write_spec.

References imb_create_write_context(), and imb_oiio_write().

◆ interpolate_bilinear_border_byte() [1/2]

◆ interpolate_bilinear_border_byte() [2/2]

void blender::imbuf::interpolate_bilinear_border_byte ( const ImBuf * in,
uchar output[4],
float u,
float v )
inline

◆ interpolate_bilinear_border_fl() [1/2]

void blender::imbuf::interpolate_bilinear_border_fl ( const ImBuf * in,
float output[4],
float u,
float v )
inline

◆ interpolate_bilinear_border_fl() [2/2]

◆ interpolate_bilinear_byte() [1/2]

uchar4 blender::imbuf::interpolate_bilinear_byte ( const ImBuf * in,
float u,
float v )
inlinenodiscard

◆ interpolate_bilinear_byte() [2/2]

void blender::imbuf::interpolate_bilinear_byte ( const ImBuf * in,
uchar output[4],
float u,
float v )
inline

◆ interpolate_bilinear_fl() [1/2]

void blender::imbuf::interpolate_bilinear_fl ( const ImBuf * in,
float output[4],
float u,
float v )
inline

◆ interpolate_bilinear_fl() [2/2]

float4 blender::imbuf::interpolate_bilinear_fl ( const ImBuf * in,
float u,
float v )
inlinenodiscard

◆ interpolate_bilinear_wrap_byte()

uchar4 blender::imbuf::interpolate_bilinear_wrap_byte ( const ImBuf * in,
float u,
float v )
inlinenodiscard

◆ interpolate_bilinear_wrap_fl()

float4 blender::imbuf::interpolate_bilinear_wrap_fl ( const ImBuf * in,
float u,
float v )
inlinenodiscard

◆ interpolate_cubic_bspline_byte() [1/2]

◆ interpolate_cubic_bspline_byte() [2/2]

void blender::imbuf::interpolate_cubic_bspline_byte ( const ImBuf * in,
uchar output[4],
float u,
float v )
inline

◆ interpolate_cubic_bspline_fl() [1/2]

void blender::imbuf::interpolate_cubic_bspline_fl ( const ImBuf * in,
float output[4],
float u,
float v )
inline

◆ interpolate_cubic_bspline_fl() [2/2]

float4 blender::imbuf::interpolate_cubic_bspline_fl ( const ImBuf * in,
float u,
float v )
inlinenodiscard

◆ interpolate_cubic_mitchell_byte() [1/2]

uchar4 blender::imbuf::interpolate_cubic_mitchell_byte ( const ImBuf * in,
float u,
float v )
inlinenodiscard

◆ interpolate_cubic_mitchell_byte() [2/2]

void blender::imbuf::interpolate_cubic_mitchell_byte ( const ImBuf * in,
uchar output[4],
float u,
float v )
inline

◆ interpolate_nearest_border_byte() [1/2]

◆ interpolate_nearest_border_byte() [2/2]

void blender::imbuf::interpolate_nearest_border_byte ( const ImBuf * in,
uchar output[4],
float u,
float v )
inline

◆ interpolate_nearest_border_fl() [1/2]

void blender::imbuf::interpolate_nearest_border_fl ( const ImBuf * in,
float output[4],
float u,
float v )
inline

◆ interpolate_nearest_border_fl() [2/2]

◆ interpolate_nearest_wrap_byte()

uchar4 blender::imbuf::interpolate_nearest_wrap_byte ( const ImBuf * in,
float u,
float v )
inlinenodiscard

◆ interpolate_nearest_wrap_fl()

float4 blender::imbuf::interpolate_nearest_wrap_fl ( const ImBuf * in,
float u,
float v )
inlinenodiscard

◆ load_pixels()

template<typename T>
ImBuf * blender::imbuf::load_pixels ( ImageInput * in,
int width,
int height,
int channels,
int flags,
bool use_all_planes )
static

◆ set_file_colorspace()

void blender::imbuf::set_file_colorspace ( ImFileColorSpace & r_colorspace,
const ReadContext & ctx,
const ImageSpec & spec,
bool is_float )
static