Blender V5.3
blender::imbuf Namespace Reference

Namespaces

namespace  partial_update
namespace  tests
namespace  transform

Classes

struct  MemoryBufferWriter
struct  ReadContext
struct  WriteContext

Typedefs

using ChangesetID = int64_t

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 ImBuf * load_pixels (ImageInput *in, int width, int height, int channels, ImBufFlags flags, bool use_all_planes)
static void set_file_colorspace (ImFileColorSpace &r_colorspace, const ReadContext &ctx, const ImageSpec &spec, bool is_float)
static ImBuf * get_oiio_ibuf (ImageInput *in, const ReadContext &ctx, ImFileColorSpace &r_colorspace)
static unique_ptr< ImageInput > get_oiio_reader (const char *format, 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)
ImBuf * imb_oiio_read (const ReadContext &ctx, const ImageSpec &config, ImFileColorSpace &r_colorspace, ImageSpec &r_newspec)
static void oiio_write_prepare (const ImageSpec &file_spec, ImageBuf &orig_buf, ImageBuf &final_buf)
bool imb_oiio_write (const WriteContext &ctx, const char *filepath, const ImageSpec &file_spec)
Vector< uint8_t > imb_oiio_write_buffer (const WriteContext &ctx, const ImageSpec &file_spec)
WriteContext imb_create_write_context (const char *file_format, const ImBuf *ibuf, ImBufFlags flags, bool prefer_float)
ImageSpec imb_create_write_spec (const WriteContext &ctx, int file_channels, TypeDesc data_format)
ImBuf * imb_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)
Vector< uint8_t > imb_oiio_write_buffer (const WriteContext &ctx, const OIIO::ImageSpec &file_spec)
OIIO::ImageSpec imb_create_write_spec (const WriteContext &ctx, int file_channels, OIIO::TypeDesc data_format)

Typedef Documentation

◆ ChangesetID

Definition at line 38 of file IMB_imbuf_types.hh.

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 82 of file openimageio_support.cc.

References fill_all_channels(), 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 273 of file openimageio_support.cc.

References get_oiio_reader(), and blender::gpu::shader::metadata::in.

Referenced by get_oiio_reader(), and imb_oiio_read().

◆ imb_create_write_context()

◆ 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 )

◆ 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 ImBufFlags::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 a file.

The file_spec parameter will typically come from imb_create_write_spec.

References imb_oiio_write().

◆ imb_oiio_write_buffer() [1/2]

◆ imb_oiio_write_buffer() [2/2]

Vector< uint8_t > blender::imbuf::imb_oiio_write_buffer ( const WriteContext & ctx,
const OIIO::ImageSpec & file_spec )

The primary method for writing data from an ImBuf to an in-memory buffer.

The file_spec parameter will typically come from imb_create_write_spec.

References imb_create_write_context(), and imb_oiio_write_buffer().

◆ 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]

◆ 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]

◆ interpolate_bilinear_wrap_byte()

◆ interpolate_bilinear_wrap_fl()

◆ 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]

◆ interpolate_cubic_mitchell_byte() [1/2]

◆ 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()

◆ interpolate_nearest_wrap_fl()

◆ load_pixels()

◆ oiio_write_prepare()

void blender::imbuf::oiio_write_prepare ( const ImageSpec & file_spec,
ImageBuf & orig_buf,
ImageBuf & final_buf )
static

◆ set_file_colorspace()