Blender  V3.3
Macros | Typedefs | Enumerations | Functions
IMB_imbuf.h File Reference
#include "../blenlib/BLI_sys_types.h"

Go to the source code of this file.

Macros

#define IM_MAX_SPACE   64
 
#define FILTER_MASK_NULL   0
 
#define FILTER_MASK_MARGIN   1
 
#define FILTER_MASK_USED   2
 

Typedefs

typedef enum IMB_BlendMode IMB_BlendMode
 
typedef enum IMB_Timecode_Type IMB_Timecode_Type
 
typedef enum IMB_Proxy_Size IMB_Proxy_Size
 
typedef enum eIMBInterpolationFilterMode eIMBInterpolationFilterMode
 
typedef void(* InterpolationColorFunction) (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
typedef void(* ScanlineThreadFunc) (void *custom_data, int scanline)
 
typedef enum eIMBTransformMode eIMBTransformMode
 Transform modes to use for IMB_transform function. More...
 

Enumerations

enum  IMB_BlendMode {
  IMB_BLEND_MIX = 0 , IMB_BLEND_ADD = 1 , IMB_BLEND_SUB = 2 , IMB_BLEND_MUL = 3 ,
  IMB_BLEND_LIGHTEN = 4 , IMB_BLEND_DARKEN = 5 , IMB_BLEND_ERASE_ALPHA = 6 , IMB_BLEND_ADD_ALPHA = 7 ,
  IMB_BLEND_OVERLAY = 8 , IMB_BLEND_HARDLIGHT = 9 , IMB_BLEND_COLORBURN = 10 , IMB_BLEND_LINEARBURN = 11 ,
  IMB_BLEND_COLORDODGE = 12 , IMB_BLEND_SCREEN = 13 , IMB_BLEND_SOFTLIGHT = 14 , IMB_BLEND_PINLIGHT = 15 ,
  IMB_BLEND_VIVIDLIGHT = 16 , IMB_BLEND_LINEARLIGHT = 17 , IMB_BLEND_DIFFERENCE = 18 , IMB_BLEND_EXCLUSION = 19 ,
  IMB_BLEND_HUE = 20 , IMB_BLEND_SATURATION = 21 , IMB_BLEND_LUMINOSITY = 22 , IMB_BLEND_COLOR = 23 ,
  IMB_BLEND_INTERPOLATE = 24 , IMB_BLEND_COPY = 1000 , IMB_BLEND_COPY_RGB = 1001 , IMB_BLEND_COPY_ALPHA = 1002
}
 
enum  IMB_Timecode_Type {
  IMB_TC_NONE = 0 , IMB_TC_RECORD_RUN = 1 , IMB_TC_FREE_RUN = 2 , IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN = 4 ,
  IMB_TC_RECORD_RUN_NO_GAPS = 8 , IMB_TC_MAX_SLOT = 4
}
 
enum  IMB_Proxy_Size {
  IMB_PROXY_NONE = 0 , IMB_PROXY_25 = 1 , IMB_PROXY_50 = 2 , IMB_PROXY_75 = 4 ,
  IMB_PROXY_100 = 8 , IMB_PROXY_MAX_SLOT = 4
}
 
enum  eIMBInterpolationFilterMode { IMB_FILTER_NEAREST , IMB_FILTER_BILINEAR }
 
enum  eIMBTransformMode { IMB_TRANSFORM_MODE_REGULAR = 0 , IMB_TRANSFORM_MODE_CROP_SRC = 1 , IMB_TRANSFORM_MODE_WRAP_REPEAT = 2 }
 Transform modes to use for IMB_transform function. More...
 

Functions

void IMB_init (void)
 
void IMB_exit (void)
 
struct ImBufIMB_ibImageFromMemory (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE], const char *descr)
 
struct ImBufIMB_testiffname (const char *filepath, int flags)
 
struct ImBufIMB_loadiffname (const char *filepath, int flags, char colorspace[IM_MAX_SPACE])
 
struct ImBufIMB_thumb_load_image (const char *filepath, const size_t max_thumb_size, char colorspace[IM_MAX_SPACE])
 
void IMB_freeImBuf (struct ImBuf *ibuf)
 
struct ImBufIMB_allocImBuf (unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
 
bool IMB_initImBuf (struct ImBuf *ibuf, unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
 
struct ImBufIMB_allocFromBufferOwn (unsigned int *rect, float *rectf, unsigned int w, unsigned int h, unsigned int channels)
 
struct ImBufIMB_allocFromBuffer (const unsigned int *rect, const float *rectf, unsigned int w, unsigned int h, unsigned int channels)
 
void IMB_refImBuf (struct ImBuf *ibuf)
 
struct ImBufIMB_makeSingleUser (struct ImBuf *ibuf)
 
struct ImBufIMB_dupImBuf (const struct ImBuf *ibuf1)
 
bool addzbufImBuf (struct ImBuf *ibuf)
 
bool addzbuffloatImBuf (struct ImBuf *ibuf)
 
size_t IMB_get_size_in_memory (struct ImBuf *ibuf)
 
size_t IMB_get_rect_len (const struct ImBuf *ibuf)
 Get the length of the rect of the given image buffer in terms of pixels. More...
 
void IMB_blend_color_byte (unsigned char dst[4], const unsigned char src1[4], const unsigned char src2[4], IMB_BlendMode mode)
 
void IMB_blend_color_float (float dst[4], const float src1[4], const float src2[4], IMB_BlendMode mode)
 
void IMB_rect_crop (struct ImBuf *ibuf, const struct rcti *crop)
 
void IMB_rect_size_set (struct ImBuf *ibuf, const uint size[2])
 
void IMB_rectclip (struct ImBuf *dbuf, const struct ImBuf *sbuf, int *destx, int *desty, int *srcx, int *srcy, int *width, int *height)
 
void IMB_rectcpy (struct ImBuf *dbuf, const struct ImBuf *sbuf, int destx, int desty, int srcx, int srcy, int width, int height)
 
void IMB_rectblend (struct ImBuf *dbuf, const struct ImBuf *obuf, const struct ImBuf *sbuf, unsigned short *dmask, const unsigned short *curvemask, const unsigned short *texmask, float mask_max, int destx, int desty, int origx, int origy, int srcx, int srcy, int width, int height, IMB_BlendMode mode, bool accumulate)
 
void IMB_rectblend_threaded (struct ImBuf *dbuf, const struct ImBuf *obuf, const struct ImBuf *sbuf, unsigned short *dmask, const unsigned short *curvemask, const unsigned short *texmask, float mask_max, int destx, int desty, int origx, int origy, int srcx, int srcy, int width, int height, IMB_BlendMode mode, bool accumulate)
 
void IMB_anim_set_index_dir (struct anim *anim, const char *dir)
 
void IMB_anim_get_fname (struct anim *anim, char *file, int size)
 
int IMB_anim_index_get_frame_index (struct anim *anim, IMB_Timecode_Type tc, int position)
 
IMB_Proxy_Size IMB_anim_proxy_get_existing (struct anim *anim)
 
struct IndexBuildContextIMB_anim_index_rebuild_context (struct anim *anim, IMB_Timecode_Type tcs_in_use, IMB_Proxy_Size proxy_sizes_in_use, int quality, const bool overwrite, struct GSet *file_list, bool build_only_on_bad_performance)
 
void IMB_anim_index_rebuild (struct IndexBuildContext *context, short *stop, short *do_update, float *progress)
 
void IMB_anim_index_rebuild_finish (struct IndexBuildContext *context, short stop)
 
int IMB_anim_get_duration (struct anim *anim, IMB_Timecode_Type tc)
 
double IMD_anim_get_offset (struct anim *anim)
 
bool IMB_anim_get_fps (struct anim *anim, short *frs_sec, float *frs_sec_base, bool no_av_base)
 
struct animIMB_open_anim (const char *name, int ib_flags, int streamindex, char colorspace[IM_MAX_SPACE])
 
void IMB_suffix_anim (struct anim *anim, const char *suffix)
 
void IMB_close_anim (struct anim *anim)
 
void IMB_close_anim_proxies (struct anim *anim)
 
bool IMB_anim_can_produce_frames (const struct anim *anim)
 
int ismovie (const char *filepath)
 
int IMB_anim_get_image_width (struct anim *anim)
 
int IMB_anim_get_image_height (struct anim *anim)
 
bool IMB_get_gop_decode_time (struct anim *anim)
 
struct ImBufIMB_anim_absolute (struct anim *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size)
 
struct ImBufIMB_anim_previewframe (struct anim *anim)
 
void IMB_free_anim (struct anim *anim)
 
void IMB_filter (struct ImBuf *ibuf)
 
void IMB_mask_filter_extend (char *mask, int width, int height)
 
void IMB_mask_clear (struct ImBuf *ibuf, const char *mask, int val)
 
void IMB_filter_extend (struct ImBuf *ibuf, char *mask, int filter)
 
void IMB_makemipmap (struct ImBuf *ibuf, int use_filter)
 
void IMB_remakemipmap (struct ImBuf *ibuf, int use_filter)
 
struct ImBufIMB_getmipmap (struct ImBuf *ibuf, int level)
 
void IMB_tile_cache_params (int totthread, int maxmem)
 
unsigned int * IMB_gettile (struct ImBuf *ibuf, int tx, int ty, int thread)
 
void IMB_tiles_to_rect (struct ImBuf *ibuf)
 
void IMB_filtery (struct ImBuf *ibuf)
 
struct ImBufIMB_onehalf (struct ImBuf *ibuf1)
 
bool IMB_scaleImBuf (struct ImBuf *ibuf, unsigned int newx, unsigned int newy)
 
bool IMB_scalefastImBuf (struct ImBuf *ibuf, unsigned int newx, unsigned int newy)
 
void IMB_scaleImBuf_threaded (struct ImBuf *ibuf, unsigned int newx, unsigned int newy)
 
bool IMB_saveiff (struct ImBuf *ibuf, const char *filepath, int flags)
 
bool IMB_ispic (const char *filepath)
 
bool IMB_ispic_type_matches (const char *filepath, int filetype)
 
int IMB_ispic_type_from_memory (const unsigned char *buf, size_t buf_size)
 
int IMB_ispic_type (const char *filepath)
 
bool IMB_isanim (const char *filepath)
 
int imb_get_anim_type (const char *filepath)
 
bool IMB_alpha_affects_rgb (const struct ImBuf *ibuf)
 
void IMB_rect_from_float (struct ImBuf *ibuf)
 
void IMB_float_from_rect_ex (struct ImBuf *dst, const struct ImBuf *src, const struct rcti *region_to_update)
 
void IMB_float_from_rect (struct ImBuf *ibuf)
 
void IMB_color_to_bw (struct ImBuf *ibuf)
 
void IMB_saturation (struct ImBuf *ibuf, float sat)
 
void IMB_buffer_byte_from_float (unsigned char *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)
 
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)
 
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)
 
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 (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)
 
void IMB_buffer_float_unpremultiply (float *buf, int width, int height)
 
void IMB_buffer_float_premultiply (float *buf, int width, int height)
 
void IMB_convert_rgba_to_abgr (struct ImBuf *ibuf)
 
void bicubic_interpolation (const struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout)
 
void nearest_interpolation (const struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout)
 
void bilinear_interpolation (const struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout)
 
void bicubic_interpolation_color (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void nearest_interpolation_color_char (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void nearest_interpolation_color_fl (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void nearest_interpolation_color (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void nearest_interpolation_color_wrap (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void bilinear_interpolation_color (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void bilinear_interpolation_color_char (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void bilinear_interpolation_color_fl (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void bilinear_interpolation_color_wrap (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)
 
void IMB_alpha_under_color_float (float *rect_float, int x, int y, float backcol[3])
 
void IMB_alpha_under_color_byte (unsigned char *rect, int x, int y, const float backcol[3])
 
void IMB_sampleImageAtLocation (struct ImBuf *ibuf, float x, float y, bool make_linear_rgb, float color[4])
 
struct ImBufIMB_loadifffile (int file, const char *filepath, int flags, char colorspace[IM_MAX_SPACE], const char *descr)
 
struct ImBufIMB_half_x (struct ImBuf *ibuf1)
 
struct ImBufIMB_double_fast_x (struct ImBuf *ibuf1)
 
struct ImBufIMB_double_x (struct ImBuf *ibuf1)
 
struct ImBufIMB_half_y (struct ImBuf *ibuf1)
 
struct ImBufIMB_double_fast_y (struct ImBuf *ibuf1)
 
struct ImBufIMB_double_y (struct ImBuf *ibuf1)
 
void IMB_flipx (struct ImBuf *ibuf)
 
void IMB_flipy (struct ImBuf *ibuf)
 
void IMB_premultiply_alpha (struct ImBuf *ibuf)
 
void IMB_unpremultiply_alpha (struct ImBuf *ibuf)
 
void IMB_freezbufImBuf (struct ImBuf *ibuf)
 
void IMB_freezbuffloatImBuf (struct ImBuf *ibuf)
 
void IMB_rectfill (struct ImBuf *drect, const float col[4])
 
void IMB_rectfill_area (struct ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2, struct ColorManagedDisplay *display)
 
void IMB_rectfill_area_replace (const struct ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2)
 
void IMB_rectfill_alpha (struct ImBuf *ibuf, float value)
 
void buf_rectfill_area (unsigned char *rect, float *rectf, int width, int height, const float col[4], struct ColorManagedDisplay *display, int x1, int y1, int x2, int y2)
 
voidimb_alloc_pixels (unsigned int x, unsigned int y, unsigned int channels, size_t typesize, const char *name)
 
bool imb_addrectImBuf (struct ImBuf *ibuf)
 
void imb_freerectImBuf (struct ImBuf *ibuf)
 
bool imb_addrectfloatImBuf (struct ImBuf *ibuf, const unsigned int channels)
 
void imb_freerectfloatImBuf (struct ImBuf *ibuf)
 
void imb_freemipmapImBuf (struct ImBuf *ibuf)
 
bool imb_addtilesImBuf (struct ImBuf *ibuf)
 
void imb_freetilesImBuf (struct ImBuf *ibuf)
 
void imb_freerectImbuf_all (struct ImBuf *ibuf)
 
void IMB_processor_apply_threaded (int buffer_lines, int handle_size, void *init_customdata, void(init_handle)(void *handle, int start_line, int tot_line, void *customdata), void *(do_thread)(void *))
 
void IMB_processor_apply_threaded_scanlines (int total_scanlines, ScanlineThreadFunc do_thread, void *custom_data)
 
void IMB_transform (const struct ImBuf *src, struct ImBuf *dst, eIMBTransformMode mode, eIMBInterpolationFilterMode filter, const float transform_matrix[4][4], const struct rctf *src_crop)
 Transform source image buffer onto destination image buffer using a transform matrix. More...
 
void IMB_ffmpeg_init (void)
 
const char * IMB_ffmpeg_last_error (void)
 
struct GPUTextureIMB_create_gpu_texture (const char *name, struct ImBuf *ibuf, bool use_high_bitdepth, bool use_premult)
 
void IMB_gpu_clamp_half_float (struct ImBuf *image_buffer)
 
struct GPUTextureIMB_touch_gpu_texture (const char *name, struct ImBuf *ibuf, int w, int h, int layers, bool use_high_bitdepth)
 
void IMB_update_gpu_texture_sub (struct GPUTexture *tex, struct ImBuf *ibuf, int x, int y, int z, int w, int h, bool use_high_bitdepth, bool use_premult)
 
void IMB_stereo3d_write_dimensions (char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height)
 
void IMB_stereo3d_read_dimensions (char mode, bool is_squeezed, size_t width, size_t height, size_t *r_width, size_t *r_height)
 
int * IMB_stereo3d_from_rect (const struct ImageFormatData *im_format, size_t x, size_t y, size_t channels, int *rect_left, int *rect_right)
 
floatIMB_stereo3d_from_rectf (const struct ImageFormatData *im_format, size_t x, size_t y, size_t channels, float *rectf_left, float *rectf_right)
 
struct ImBufIMB_stereo3d_ImBuf (const struct ImageFormatData *im_format, struct ImBuf *ibuf_left, struct ImBuf *ibuf_right)
 
void IMB_ImBufFromStereo3d (const struct Stereo3dFormat *s3d, struct ImBuf *ibuf_stereo, struct ImBuf **r_ibuf_left, struct ImBuf **r_ibuf_right)
 

Macro Definition Documentation

◆ FILTER_MASK_MARGIN

#define FILTER_MASK_MARGIN   1

Definition at line 458 of file IMB_imbuf.h.

◆ FILTER_MASK_NULL

#define FILTER_MASK_NULL   0
Attention
Defined in filter.c

Definition at line 457 of file IMB_imbuf.h.

◆ FILTER_MASK_USED

#define FILTER_MASK_USED   2

Definition at line 459 of file IMB_imbuf.h.

◆ IM_MAX_SPACE

#define IM_MAX_SPACE   64

Definition at line 49 of file IMB_imbuf.h.

Typedef Documentation

◆ eIMBInterpolationFilterMode

◆ eIMBTransformMode

Transform modes to use for IMB_transform function.

These are not flags as the combination of cropping and repeat can lead to different expectation.

◆ IMB_BlendMode

Attention
Defined in rectop.c

◆ IMB_Proxy_Size

◆ IMB_Timecode_Type

Attention
Defined in indexer.c

◆ InterpolationColorFunction

typedef void(* InterpolationColorFunction) (const struct ImBuf *in, unsigned char outI[4], float outF[4], float u, float v)

Definition at line 686 of file IMB_imbuf.h.

◆ ScanlineThreadFunc

typedef void(* ScanlineThreadFunc) (void *custom_data, int scanline)

Definition at line 882 of file IMB_imbuf.h.

Enumeration Type Documentation

◆ eIMBInterpolationFilterMode

Enumerator
IMB_FILTER_NEAREST 
IMB_FILTER_BILINEAR 

Definition at line 349 of file IMB_imbuf.h.

◆ eIMBTransformMode

Transform modes to use for IMB_transform function.

These are not flags as the combination of cropping and repeat can lead to different expectation.

Enumerator
IMB_TRANSFORM_MODE_REGULAR 

Do not crop or repeat.

IMB_TRANSFORM_MODE_CROP_SRC 

Crop the source buffer.

IMB_TRANSFORM_MODE_WRAP_REPEAT 

Wrap repeat the source buffer. Only supported in with nearest filtering.

Definition at line 892 of file IMB_imbuf.h.

◆ IMB_BlendMode

Attention
Defined in rectop.c
Enumerator
IMB_BLEND_MIX 
IMB_BLEND_ADD 
IMB_BLEND_SUB 
IMB_BLEND_MUL 
IMB_BLEND_LIGHTEN 
IMB_BLEND_DARKEN 
IMB_BLEND_ERASE_ALPHA 
IMB_BLEND_ADD_ALPHA 
IMB_BLEND_OVERLAY 
IMB_BLEND_HARDLIGHT 
IMB_BLEND_COLORBURN 
IMB_BLEND_LINEARBURN 
IMB_BLEND_COLORDODGE 
IMB_BLEND_SCREEN 
IMB_BLEND_SOFTLIGHT 
IMB_BLEND_PINLIGHT 
IMB_BLEND_VIVIDLIGHT 
IMB_BLEND_LINEARLIGHT 
IMB_BLEND_DIFFERENCE 
IMB_BLEND_EXCLUSION 
IMB_BLEND_HUE 
IMB_BLEND_SATURATION 
IMB_BLEND_LUMINOSITY 
IMB_BLEND_COLOR 
IMB_BLEND_INTERPOLATE 
IMB_BLEND_COPY 
IMB_BLEND_COPY_RGB 
IMB_BLEND_COPY_ALPHA 

Definition at line 209 of file IMB_imbuf.h.

◆ IMB_Proxy_Size

Enumerator
IMB_PROXY_NONE 
IMB_PROXY_25 
IMB_PROXY_50 
IMB_PROXY_75 
IMB_PROXY_100 
IMB_PROXY_MAX_SLOT 

Definition at line 340 of file IMB_imbuf.h.

◆ IMB_Timecode_Type

Attention
Defined in indexer.c
Enumerator
IMB_TC_NONE 

Don't use time-code files at all.

IMB_TC_RECORD_RUN 

Use images in the order as they are recorded (currently, this is the only one implemented and is a sane default).

IMB_TC_FREE_RUN 

Use global timestamp written by recording device (prosumer camcorders e.g. can do that).

IMB_TC_INTERPOLATED_REC_DATE_FREE_RUN 

Interpolate a global timestamp using the record date and time written by recording device (every consumer camcorder can do that).

IMB_TC_RECORD_RUN_NO_GAPS 
IMB_TC_MAX_SLOT 

Definition at line 316 of file IMB_imbuf.h.

Function Documentation

◆ addzbuffloatImBuf()

bool addzbuffloatImBuf ( struct ImBuf ibuf)

◆ addzbufImBuf()

bool addzbufImBuf ( struct ImBuf ibuf)

◆ bicubic_interpolation()

void bicubic_interpolation ( const struct ImBuf in,
struct ImBuf out,
float  u,
float  v,
int  xout,
int  yout 
)
Attention
defined in imageprocess.c

◆ bicubic_interpolation_color()

void bicubic_interpolation_color ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)

◆ bilinear_interpolation()

void bilinear_interpolation ( const struct ImBuf in,
struct ImBuf out,
float  u,
float  v,
int  xout,
int  yout 
)

◆ bilinear_interpolation_color()

void bilinear_interpolation_color ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)

◆ bilinear_interpolation_color_char()

void bilinear_interpolation_color_char ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)

◆ bilinear_interpolation_color_fl()

void bilinear_interpolation_color_fl ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)

◆ bilinear_interpolation_color_wrap()

void bilinear_interpolation_color_wrap ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)

Note about wrapping, the u/v still needs to be within the image bounds, just the interpolation is wrapped. This the same as bilinear_interpolation_color except it wraps rather than using empty and emptyI.

Definition at line 142 of file imageprocess.c.

References Freestyle::a, usdtokens::b(), ceil(), clamp_v4(), blender::math::floor(), floorf, ImBuf::rect, ImBuf::rect_float, v, ImBuf::x, x2, ImBuf::y, and y1.

Referenced by paint_sample_color(), project_face_pixel(), and project_paint_PickColor().

◆ buf_rectfill_area()

void buf_rectfill_area ( unsigned char *  rect,
float rectf,
int  width,
int  height,
const float  col[4],
struct ColorManagedDisplay display,
int  x1,
int  y1,
int  x2,
int  y2 
)

This should not be here, really, we needed it for operating on render data, IMB_rectfill_area calls it.

Definition at line 1128 of file rectop.c.

References Freestyle::a, CLAMP, col, copy_v4_v4(), fb(), height, IMB_colormanagement_display_to_scene_linear_v3(), srgb_to_linearrgb_v4(), SWAP, unit_float_to_uchar_clamp(), width, x2, and y1.

Referenced by BKE_image_stamp_buf(), and IMB_rectfill_area().

◆ imb_addrectfloatImBuf()

bool imb_addrectfloatImBuf ( struct ImBuf ibuf,
const unsigned int  channels 
)

◆ imb_addrectImBuf()

bool imb_addrectImBuf ( struct ImBuf ibuf)

◆ imb_addtilesImBuf()

bool imb_addtilesImBuf ( struct ImBuf ibuf)

Definition at line 484 of file allocimbuf.c.

References IB_tiles, ImBuf::mall, MEM_callocN, NULL, ImBuf::tiles, ImBuf::xtiles, and ImBuf::ytiles.

Referenced by imb_loadtiff().

◆ imb_alloc_pixels()

void* imb_alloc_pixels ( unsigned int  x,
unsigned int  y,
unsigned int  channels,
size_t  typesize,
const char *  name 
)

◆ IMB_allocFromBuffer()

struct ImBuf* IMB_allocFromBuffer ( const unsigned int *  rect,
const float rectf,
unsigned int  w,
unsigned int  h,
unsigned int  channels 
)

◆ IMB_allocFromBufferOwn()

struct ImBuf* IMB_allocFromBufferOwn ( unsigned int *  rect,
float rectf,
unsigned int  w,
unsigned int  h,
unsigned int  channels 
)

Create a copy of a pixel buffer and wrap it to a new ImBuf (transferring ownership to the in imbuf).

Attention
Defined in allocimbuf.c

Definition at line 415 of file allocimbuf.c.

References BLI_assert, ImBuf::channels, channels(), ImBuf::flags, IB_rect, IB_rectfloat, IMB_allocImBuf(), ImBuf::mall, MEM_allocN_len, NULL, ImBuf::rect, ImBuf::rect_float, and w().

Referenced by blend_file_thumb_from_screenshot(), studiolight_calculate_irradiance_equirect_image(), and studiolight_load_equirect_image().

◆ IMB_allocImBuf()

struct ImBuf* IMB_allocImBuf ( unsigned int  x,
unsigned int  y,
unsigned char  planes,
unsigned int  flags 
)
Attention
Defined in allocimbuf.c

Definition at line 500 of file allocimbuf.c.

References ImBuf::flags, IMB_freeImBuf(), IMB_initImBuf(), MEM_mallocN, NULL, ImBuf::planes, x, and y.

Referenced by accessor_get_ibuf(), add_ibuf_size(), BKE_previewimg_to_imbuf(), BKE_tracking_get_plane_imbuf(), BKE_tracking_get_search_imbuf(), BKE_tracking_sample_pattern(), BKE_tracking_stabilize_frame(), brush_painter_imbuf_new(), brush_painter_imbuf_partial_update(), colormanage_cache_put(), blender::compositor::OutputStereoOperation::deinit_execution(), blender::compositor::OutputSingleLayerOperation::deinit_execution(), dynamicPaint_outputSurfaceImage(), ED_view3d_draw_offscreen_imbuf(), FloatBufferCache::ensure_float_buffer(), blender::compositor::DebugInfo::export_operation(), filelist_init_icons(), float_image_to_ibuf(), gpencil_render_offscreen(), GHOST_SystemCocoa::handleDraggingEvent(), ibJpegImageFromCinfo(), image_acquire_ibuf(), image_get_ibuf_multilayer(), image_get_render_result(), image_load_sequence_multilayer(), IMB_allocFromBuffer(), IMB_allocFromBufferOwn(), imb_bmp_decode(), IMB_double_fast_x(), IMB_double_fast_y(), IMB_dupImBuf(), IMB_half_x(), IMB_half_y(), IMB_ImBufFromStereo3d(), imb_load_dds(), imb_load_dpx_cineon(), imb_load_filepath_thumbnail_openexr(), imb_load_jp2_stream(), imb_load_openexr(), imb_loadhdr(), imb_loadiris(), imb_loadpng(), imb_loadtarga(), imb_loadtiff(), imb_loadwebp(), IMB_makemipmap(), imb_oiio_load_image(), imb_oiio_load_image_float(), IMB_onehalf(), imb_read_tiff_pixels(), IMB_remakemipmap(), IMB_stereo3d_ImBuf(), imb_stereo3d_squeeze_rect(), imb_stereo3d_squeeze_rectf(), IMB_thumb_load_font(), imbuf_alloc_temp_tile(), input_preprocess(), Freestyle::Canvas::loadMap(), M_imbuf_new(), make_grayscale_ibuf_copy(), make_histogram_view_from_ibuf_byte(), make_histogram_view_from_ibuf_float(), make_sep_waveform_view_from_ibuf_byte(), make_sep_waveform_view_from_ibuf_float(), make_vectorscope_view_from_ibuf_byte(), make_vectorscope_view_from_ibuf_float(), make_waveform_view_from_ibuf_byte(), make_waveform_view_from_ibuf_float(), make_zebra_view_from_ibuf(), paint_2d_lift_clone(), prepare_effect_imbufs(), RE_layer_load_from_file(), RE_render_result_rect_to_ibuf(), Freestyle::SteerableViewMap::saveSteerableViewMap(), screen_opengl_render_doit(), screenshot_exec(), seq_disk_cache_read_file(), seq_get_uncached_thumbnail(), seq_render_effect_strip_impl(), seq_render_mask(), seq_render_scene_strip(), seq_render_strip(), seq_render_strip_stack(), thumb_create_ex(), and write_external_bake_pixels().

◆ IMB_alpha_affects_rgb()

bool IMB_alpha_affects_rgb ( const struct ImBuf ibuf)

◆ IMB_alpha_under_color_byte()

void IMB_alpha_under_color_byte ( unsigned char *  rect,
int  x,
int  y,
const float  backcol[3] 
)

Definition at line 449 of file imageprocess.c.

References Freestyle::a, mul(), x, and y.

Referenced by IMB_colormanagement_imbuf_for_write().

◆ IMB_alpha_under_color_float()

void IMB_alpha_under_color_float ( float rect_float,
int  x,
int  y,
float  backcol[3] 
)

Definition at line 435 of file imageprocess.c.

References Freestyle::a, madd_v3_v3fl(), mul(), x, and y.

Referenced by IMB_colormanagement_imbuf_for_write().

◆ IMB_anim_absolute()

struct ImBuf* IMB_anim_absolute ( struct anim anim,
int  position,
IMB_Timecode_Type  tc,
IMB_Proxy_Size  preview_size 
)

◆ IMB_anim_can_produce_frames()

bool IMB_anim_can_produce_frames ( const struct anim anim)

Definition at line 295 of file anim_movie.c.

References anim::avi, NULL, and UNUSED_VARS.

Referenced by SEQ_add_movie_reload_if_needed().

◆ IMB_anim_get_duration()

int IMB_anim_get_duration ( struct anim anim,
IMB_Timecode_Type  tc 
)

◆ IMB_anim_get_fname()

void IMB_anim_get_fname ( struct anim anim,
char *  file,
int  size 
)

Definition at line 389 of file indexer.c.

References BLI_split_dirfile(), BLI_strncpy(), file, FILE_MAXFILE, anim::name, and size().

Referenced by seq_proxy_index_dir_set().

◆ IMB_anim_get_fps()

bool IMB_anim_get_fps ( struct anim anim,
short *  frs_sec,
float frs_sec_base,
bool  no_av_base 
)

Return the fps contained in movie files (function rval is false, and frs_sec and frs_sec_base untouched if none available!)

Definition at line 1678 of file anim_movie.c.

References BLI_assert, double(), float(), anim::frs_sec, anim::frs_sec_base, and UNUSED_VARS.

Referenced by BKE_movieclip_get_fps(), prefetch_data_fn(), SEQ_add_movie_strip(), seq_render_movie_strip(), SEQ_time_sequence_get_fps(), uiTemplateMovieclipInformation(), and wm_main_playanim_intern().

◆ IMB_anim_get_image_height()

int IMB_anim_get_image_height ( struct anim anim)

Definition at line 1716 of file anim_movie.c.

References anim::y.

Referenced by SEQ_add_movie_strip().

◆ IMB_anim_get_image_width()

int IMB_anim_get_image_width ( struct anim anim)

Definition at line 1711 of file anim_movie.c.

References anim::x.

Referenced by SEQ_add_movie_strip().

◆ IMB_anim_index_get_frame_index()

int IMB_anim_index_get_frame_index ( struct anim anim,
IMB_Timecode_Type  tc,
int  position 
)

Definition at line 1590 of file indexer.c.

References IMB_anim_open_index(), and IMB_indexer_get_frame_index().

Referenced by IMB_anim_absolute(), and seq_proxy_fetch().

◆ IMB_anim_index_rebuild()

void IMB_anim_index_rebuild ( struct IndexBuildContext context,
short *  stop,
short *  do_update,
float progress 
)

Will rebuild all used indices and proxies at once.

Definition at line 1460 of file indexer.c.

References ANIM_FFMPEG, blender::compositor::context, and UNUSED_VARS.

Referenced by do_movie_proxy(), and SEQ_proxy_rebuild().

◆ IMB_anim_index_rebuild_context()

struct IndexBuildContext* IMB_anim_index_rebuild_context ( struct anim anim,
IMB_Timecode_Type  tcs_in_use,
IMB_Proxy_Size  proxy_sizes_in_use,
int  quality,
const bool  overwrite,
struct GSet file_list,
bool  build_only_on_bad_performance 
)

◆ IMB_anim_index_rebuild_finish()

void IMB_anim_index_rebuild_finish ( struct IndexBuildContext context,
short  stop 
)

Finish rebuilding proxies/time-codes and free temporary contexts used.

Definition at line 1486 of file indexer.c.

References ANIM_FFMPEG, blender::compositor::context, proxy_sizes, and UNUSED_VARS.

Referenced by proxy_endjob(), and SEQ_proxy_rebuild_finish().

◆ IMB_anim_previewframe()

struct ImBuf* IMB_anim_previewframe ( struct anim anim)
Attention
Defined in anim_movie.c fetches a define preview-frame, usually half way into the movie.

Definition at line 1557 of file anim_movie.c.

References anim::duration_in_frames, IMB_anim_absolute(), IMB_freeImBuf(), IMB_PROXY_NONE, IMB_TC_NONE, and NULL.

Referenced by thumb_create_ex().

◆ IMB_anim_proxy_get_existing()

IMB_Proxy_Size IMB_anim_proxy_get_existing ( struct anim anim)

◆ IMB_anim_set_index_dir()

void IMB_anim_set_index_dir ( struct anim anim,
const char *  dir 
)

Defaults to BL_proxy within the directory of the animation.

Definition at line 1527 of file indexer.c.

References BLI_strncpy(), IMB_free_indices(), anim::index_dir, and STREQ.

Referenced by movieclip_open_anim_file(), and seq_proxy_index_dir_set().

◆ IMB_blend_color_byte()

void IMB_blend_color_byte ( unsigned char  dst[4],
const unsigned char  src1[4],
const unsigned char  src2[4],
IMB_BlendMode  mode 
)

◆ IMB_blend_color_float()

void IMB_blend_color_float ( float  dst[4],
const float  src1[4],
const float  src2[4],
IMB_BlendMode  mode 
)

Definition at line 112 of file rectop.c.

References blend_color_add_alpha_float(), blend_color_add_float(), blend_color_burn_float(), blend_color_color_float(), blend_color_darken_float(), blend_color_difference_float(), blend_color_dodge_float(), blend_color_erase_alpha_float(), blend_color_exclusion_float(), blend_color_hardlight_float(), blend_color_hue_float(), blend_color_lighten_float(), blend_color_linearburn_float(), blend_color_linearlight_float(), blend_color_luminosity_float(), blend_color_mix_float(), blend_color_mul_float(), blend_color_overlay_float(), blend_color_pinlight_float(), blend_color_saturation_float(), blend_color_screen_float(), blend_color_softlight_float(), blend_color_sub_float(), blend_color_vividlight_float(), IMB_BLEND_ADD, IMB_BLEND_ADD_ALPHA, IMB_BLEND_COLOR, IMB_BLEND_COLORBURN, IMB_BLEND_COLORDODGE, IMB_BLEND_DARKEN, IMB_BLEND_DIFFERENCE, IMB_BLEND_ERASE_ALPHA, IMB_BLEND_EXCLUSION, IMB_BLEND_HARDLIGHT, IMB_BLEND_HUE, IMB_BLEND_LIGHTEN, IMB_BLEND_LINEARBURN, IMB_BLEND_LINEARLIGHT, IMB_BLEND_LUMINOSITY, IMB_BLEND_MIX, IMB_BLEND_MUL, IMB_BLEND_OVERLAY, IMB_BLEND_PINLIGHT, IMB_BLEND_SATURATION, IMB_BLEND_SCREEN, IMB_BLEND_SOFTLIGHT, IMB_BLEND_SUB, and IMB_BLEND_VIVIDLIGHT.

Referenced by do_paint_brush_task_cb_ex(), do_projectpaint_clone_f(), do_projectpaint_draw_f(), do_projectpaint_mask_f(), do_projectpaint_thread(), blender::ed::sculpt_paint::paint::image::PaintingKernel< ImageBuffer >::paint(), paint_2d_bucket_fill(), paint_2d_gradient_fill(), and sculpt_expand_colors_update_task_cb().

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

void IMB_buffer_byte_from_float ( unsigned char *  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 
)

◆ 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 574 of file divers.c.

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

Referenced by 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_buffer_float_premultiply()

void IMB_buffer_float_premultiply ( float buf,
int  width,
int  height 
)

Definition at line 873 of file divers.c.

References height, straight_to_premul_v4(), and width.

Referenced by do_glow_effect_byte().

◆ IMB_buffer_float_unpremultiply()

void IMB_buffer_float_unpremultiply ( float buf,
int  width,
int  height 
)

Definition at line 863 of file divers.c.

References height, premul_to_straight_v4(), and width.

Referenced by do_glow_effect_byte().

◆ IMB_close_anim()

void IMB_close_anim ( struct anim anim)

Definition at line 215 of file anim_movie.c.

References IMB_free_anim(), and NULL.

Referenced by IMB_free_indices(), and wm_main_playanim_intern().

◆ IMB_close_anim_proxies()

void IMB_close_anim_proxies ( struct anim anim)

Definition at line 224 of file anim_movie.c.

References IMB_free_indices(), and NULL.

Referenced by proxy_endjob(), and SEQ_proxy_rebuild_finish().

◆ IMB_color_to_bw()

void IMB_color_to_bw ( struct ImBuf ibuf)

◆ IMB_convert_rgba_to_abgr()

void IMB_convert_rgba_to_abgr ( struct ImBuf ibuf)

Change the ordering of the color bytes pointed to by rect from rgba to abgr. size * 4 color bytes are reordered.

Attention
Defined in imageprocess.c

Only this one is used liberally here, and in imbuf.

Definition at line 26 of file imageprocess.c.

References if(), ImBuf::rect, ImBuf::rect_float, size(), ImBuf::x, and ImBuf::y.

Referenced by IMB_anim_absolute(), imb_loadiris(), imb_loadtarga(), imb_read_tiff_pixels(), and imb_saveiris().

◆ IMB_create_gpu_texture()

struct GPUTexture* IMB_create_gpu_texture ( const char *  name,
struct ImBuf ibuf,
bool  use_high_bitdepth,
bool  use_premult 
)

◆ IMB_double_fast_x()

struct ImBuf* IMB_double_fast_x ( struct ImBuf ibuf1)
Attention
defined in scaling.c

Definition at line 107 of file scaling.c.

References col, dest, ImBuf::flags, IMB_allocImBuf(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.

Referenced by IMB_double_x().

◆ IMB_double_fast_y()

struct ImBuf* IMB_double_fast_y ( struct ImBuf ibuf1)
Attention
defined in scaling.c

Definition at line 260 of file scaling.c.

References ImBuf::flags, IMB_allocImBuf(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, y, and ImBuf::y.

Referenced by IMB_double_y().

◆ IMB_double_x()

struct ImBuf* IMB_double_x ( struct ImBuf ibuf1)
Attention
defined in scaling.c

Definition at line 152 of file scaling.c.

References IMB_double_fast_x(), imb_filterx(), NULL, ImBuf::rect, and ImBuf::rect_float.

◆ IMB_double_y()

struct ImBuf* IMB_double_y ( struct ImBuf ibuf1)
Attention
defined in scaling.c

Definition at line 307 of file scaling.c.

References IMB_double_fast_y(), IMB_filtery(), NULL, and ImBuf::rect.

◆ IMB_dupImBuf()

struct ImBuf* IMB_dupImBuf ( const struct ImBuf ibuf1)

◆ IMB_exit()

void IMB_exit ( void  )

◆ IMB_ffmpeg_init()

void IMB_ffmpeg_init ( void  )

Referenced by arg_handle_playback_mode(), and main().

◆ IMB_ffmpeg_last_error()

const char* IMB_ffmpeg_last_error ( void  )

◆ IMB_filter()

void IMB_filter ( struct ImBuf ibuf)

Definition at line 301 of file filter.c.

References imb_filterx(), and IMB_filtery().

◆ IMB_filter_extend()

void IMB_filter_extend ( struct ImBuf ibuf,
char *  mask,
int  filter 
)

If alpha is zero, it checks surrounding pixels and averages color. sets new alphas to 1.0 When a mask is given, the mask will be used instead of the alpha channel, where only pixels with a mask value of 0 will be written to, and only pixels with a mask value of 1 will be used for the average. The mask will be set to one for the pixels which were written.

Definition at line 406 of file filter.c.

References Freestyle::c, check_pixel_assigned(), filter(), filter_make_index(), FILTER_MASK_MARGIN, float(), height, mask(), MEM_dupallocN, MEM_freeN, NULL, r, ImBuf::rect, ImBuf::rect_float, sqrt(), width, x, ImBuf::x, y, and ImBuf::y.

Referenced by bake_ibuf_filter(), blender::render::texturemargin::generate_margin(), and RE_bake_margin().

◆ IMB_filtery()

void IMB_filtery ( struct ImBuf ibuf)
Attention
Defined in filter.c

Definition at line 102 of file filter.c.

References filtcolum(), filtcolumf(), ImBuf::planes, point, ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, y, and ImBuf::y.

Referenced by IMB_anim_absolute(), IMB_double_y(), IMB_filter(), and input_preprocess().

◆ IMB_flipx()

void IMB_flipx ( struct ImBuf ibuf)
Attention
Defined in rotate.c

Definition at line 75 of file rotate.c.

References NULL, ImBuf::rect, ImBuf::rect_float, SWAP, x, ImBuf::x, y, and ImBuf::y.

Referenced by input_preprocess().

◆ IMB_flipy()

void IMB_flipy ( struct ImBuf ibuf)

◆ IMB_float_from_rect()

void IMB_float_from_rect ( struct ImBuf ibuf)

◆ IMB_float_from_rect_ex()

void IMB_float_from_rect_ex ( struct ImBuf dst,
const struct ImBuf src,
const struct rcti region_to_update 
)

◆ IMB_free_anim()

void IMB_free_anim ( struct anim anim)

◆ IMB_freeImBuf()

void IMB_freeImBuf ( struct ImBuf ibuf)

◆ imb_freemipmapImBuf()

void imb_freemipmapImBuf ( struct ImBuf ibuf)

◆ imb_freerectfloatImBuf()

void imb_freerectfloatImBuf ( struct ImBuf ibuf)

◆ imb_freerectImBuf()

void imb_freerectImBuf ( struct ImBuf ibuf)

◆ imb_freerectImbuf_all()

void imb_freerectImbuf_all ( struct ImBuf ibuf)

Free all pixel data (associated with image size).

Definition at line 182 of file allocimbuf.c.

References freeencodedbufferImBuf(), imb_freerectfloatImBuf(), imb_freerectImBuf(), imb_freetilesImBuf(), IMB_freezbuffloatImBuf(), and IMB_freezbufImBuf().

Referenced by IMB_freeImBuf(), and ubuf_ensure_compat_ibuf().

◆ imb_freetilesImBuf()

void imb_freetilesImBuf ( struct ImBuf ibuf)

◆ IMB_freezbuffloatImBuf()

void IMB_freezbuffloatImBuf ( struct ImBuf ibuf)

◆ IMB_freezbufImBuf()

void IMB_freezbufImBuf ( struct ImBuf ibuf)
Attention
Defined in allocimbuf.c

Definition at line 154 of file allocimbuf.c.

References IB_zbuf, ImBuf::mall, MEM_freeN, NULL, and ImBuf::zbuf.

Referenced by addzbufImBuf(), image_save_post(), imb_freerectImbuf_all(), and scalefast_Z_ImBuf().

◆ imb_get_anim_type()

int imb_get_anim_type ( const char *  filepath)

◆ IMB_get_gop_decode_time()

bool IMB_get_gop_decode_time ( struct anim anim)

◆ IMB_get_rect_len()

size_t IMB_get_rect_len ( const struct ImBuf ibuf)

Get the length of the rect of the given image buffer in terms of pixels.

This is the width * the height of the image buffer. This function is preferred over ibuf->x * ibuf->y due to overflow issues when working with large resolution images (30kx30k).

Attention
Defined in allocimbuf.c

Referenced by IMB_color_to_bw(), IMB_float_from_rect(), IMB_saturation(), scaledownx(), and scaledowny().

◆ IMB_get_size_in_memory()

size_t IMB_get_size_in_memory ( struct ImBuf ibuf)

◆ IMB_getmipmap()

struct ImBuf* IMB_getmipmap ( struct ImBuf ibuf,
int  level 
)

Definition at line 610 of file filter.c.

References CLAMP, ImBuf::mipmap, and ImBuf::miptot.

Referenced by IMB_tiles_to_rect().

◆ IMB_gettile()

unsigned int* IMB_gettile ( struct ImBuf ibuf,
int  tx,
int  ty,
int  thread 
)

◆ IMB_gpu_clamp_half_float()

void IMB_gpu_clamp_half_float ( struct ImBuf image_buffer)

Ensures that values stored in the float rect can safely loaded into half float gpu textures.

Does nothing when given image_buffer doesn't contain a float rect.

Definition at line 294 of file util_gpu.c.

References ImBuf::channels, clamp_f(), ImBuf::rect_float, ImBuf::x, and ImBuf::y.

◆ IMB_half_x()

struct ImBuf* IMB_half_x ( struct ImBuf ibuf1)

◆ IMB_half_y()

struct ImBuf* IMB_half_y ( struct ImBuf ibuf1)

◆ IMB_ibImageFromMemory()

struct ImBuf* IMB_ibImageFromMemory ( const unsigned char *  mem,
size_t  size,
int  flags,
char  colorspace[IM_MAX_SPACE],
const char *  descr 
)

◆ IMB_ImBufFromStereo3d()

void IMB_ImBufFromStereo3d ( const struct Stereo3dFormat s3d,
struct ImBuf ibuf_stereo,
struct ImBuf **  r_ibuf_left,
struct ImBuf **  r_ibuf_right 
)

Reading a stereo encoded ibuf (*left) and generating two ibufs from it (*left and *right).

Referenced by image_load_image_file(), image_load_movie_file(), seq_render_image_strip(), and seq_render_movie_strip().

◆ IMB_init()

void IMB_init ( void  )

◆ IMB_initImBuf()

bool IMB_initImBuf ( struct ImBuf ibuf,
unsigned int  x,
unsigned int  y,
unsigned char  planes,
unsigned int  flags 
)

◆ IMB_isanim()

bool IMB_isanim ( const char *  filepath)
Attention
Defined in util.c

Definition at line 385 of file util.c.

References ANIM_SEQUENCE, imb_get_anim_type(), and type.

Referenced by build_pict_list_ex(), ED_path_extension_type(), and wm_main_playanim_intern().

◆ IMB_ispic()

bool IMB_ispic ( const char *  filepath)
Attention
Defined in util.c

Definition at line 183 of file util.c.

References IMB_FTYPE_NONE, and IMB_ispic_type().

Referenced by build_pict_list_ex(), imb_get_anim_type(), and wm_main_playanim_intern().

◆ IMB_ispic_type()

int IMB_ispic_type ( const char *  filepath)

◆ IMB_ispic_type_from_memory()

int IMB_ispic_type_from_memory ( const unsigned char *  buf,
size_t  buf_size 
)

Definition at line 138 of file util.c.

References IMB_FILE_TYPES, IMB_FILE_TYPES_LAST, IMB_FTYPE_NONE, NULL, and type.

Referenced by IMB_ispic_type(), and unpack_generate_paths().

◆ IMB_ispic_type_matches()

bool IMB_ispic_type_matches ( const char *  filepath,
int  filetype 
)

◆ IMB_loadifffile()

struct ImBuf* IMB_loadifffile ( int  file,
const char *  filepath,
int  flags,
char  colorspace[IM_MAX_SPACE],
const char *  descr 
)

◆ IMB_loadiffname()

struct ImBuf* IMB_loadiffname ( const char *  filepath,
int  flags,
char  colorspace[IM_MAX_SPACE] 
)

◆ IMB_makemipmap()

void IMB_makemipmap ( struct ImBuf ibuf,
int  use_filter 
)

◆ IMB_makeSingleUser()

struct ImBuf* IMB_makeSingleUser ( struct ImBuf ibuf)

◆ IMB_mask_clear()

void IMB_mask_clear ( struct ImBuf ibuf,
const char *  mask,
int  val 
)

Definition at line 351 of file filter.c.

References col, mask(), ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, y, and ImBuf::y.

◆ IMB_mask_filter_extend()

void IMB_mask_filter_extend ( char *  mask,
int  width,
int  height 
)

Definition at line 307 of file filter.c.

References FILTER_MASK_MARGIN, height, mask(), MEM_dupallocN, MEM_freeN, width, x, and y.

◆ IMB_onehalf()

struct ImBuf* IMB_onehalf ( struct ImBuf ibuf1)

◆ IMB_open_anim()

struct anim* IMB_open_anim ( const char *  name,
int  ib_flags,
int  streamindex,
char  colorspace[IM_MAX_SPACE] 
)

◆ IMB_premultiply_alpha()

void IMB_premultiply_alpha ( struct ImBuf ibuf)

◆ IMB_processor_apply_threaded()

void IMB_processor_apply_threaded ( int  buffer_lines,
int  handle_size,
void init_customdata,
void(init_handle)(void *handle, int start_line, int tot_line, void *customdata)  ,
void do_thread)(void * 
)

◆ IMB_processor_apply_threaded_scanlines()

void IMB_processor_apply_threaded_scanlines ( int  total_scanlines,
ScanlineThreadFunc  do_thread,
void custom_data 
)

◆ IMB_rect_crop()

void IMB_rect_crop ( struct ImBuf ibuf,
const struct rcti crop 
)

◆ IMB_rect_from_float()

void IMB_rect_from_float ( struct ImBuf ibuf)

◆ IMB_rect_size_set()

void IMB_rect_size_set ( struct ImBuf ibuf,
const uint  size[2] 
)

In-place size setting (caller must fill in buffer contents).

Definition at line 285 of file rectop.c.

References BLI_assert, ImBuf::rect, ImBuf::rect_float, rect_realloc_16bytes(), rect_realloc_4bytes(), size(), ImBuf::x, ImBuf::y, ImBuf::zbuf, and ImBuf::zbuf_float.

Referenced by ubuf_ensure_compat_ibuf().

◆ IMB_rectblend()

void IMB_rectblend ( struct ImBuf dbuf,
const struct ImBuf obuf,
const struct ImBuf sbuf,
unsigned short *  dmask,
const unsigned short *  curvemask,
const unsigned short *  texmask,
float  mask_max,
int  destx,
int  desty,
int  origx,
int  origy,
int  srcx,
int  srcy,
int  width,
int  height,
IMB_BlendMode  mode,
bool  accumulate 
)

◆ IMB_rectblend_threaded()

void IMB_rectblend_threaded ( struct ImBuf dbuf,
const struct ImBuf obuf,
const struct ImBuf sbuf,
unsigned short *  dmask,
const unsigned short *  curvemask,
const unsigned short *  texmask,
float  mask_max,
int  destx,
int  desty,
int  origx,
int  origy,
int  srcx,
int  srcy,
int  width,
int  height,
IMB_BlendMode  mode,
bool  accumulate 
)

Referenced by paint_2d_op().

◆ IMB_rectclip()

void IMB_rectclip ( struct ImBuf dbuf,
const struct ImBuf sbuf,
int *  destx,
int *  desty,
int *  srcx,
int *  srcy,
int *  width,
int *  height 
)

◆ IMB_rectcpy()

void IMB_rectcpy ( struct ImBuf dbuf,
const struct ImBuf sbuf,
int  destx,
int  desty,
int  srcx,
int  srcy,
int  width,
int  height 
)

◆ IMB_rectfill()

void IMB_rectfill ( struct ImBuf drect,
const float  col[4] 
)
Attention
Defined in rectop.c Replace pixels of entire image with solid color.
Parameters
drectAn image to be filled with color. It must be 4 channel image.
colRGBA color, which is assigned directly to both byte (via scaling) and float buffers.

Definition at line 1050 of file rectop.c.

References col, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.

Referenced by clear_single_image(), IMB_thumb_load_font(), and RE_bake_ibuf_clear().

◆ IMB_rectfill_alpha()

void IMB_rectfill_alpha ( struct ImBuf ibuf,
float  value 
)

◆ IMB_rectfill_area()

void IMB_rectfill_area ( struct ImBuf ibuf,
const float  col[4],
int  x1,
int  y1,
int  x2,
int  y2,
struct ColorManagedDisplay display 
)

Blend pixels of image area with solid color.

For images with uchar buffer use color matching image color-space. For images with float buffer use color display color-space. If display color-space can not be referenced, use color in SRGB color-space.

Parameters
ibufan image to be filled with color. It must be 4 channel image.
colRGBA color.
x1,y1,x2,y2(x1, y1) defines starting point of the rectangular area to be filled, (x2, y2) is the end point. Note that values are allowed to be loosely ordered, which means that x2 is allowed to be lower than x1, as well as y2 is allowed to be lower than y1. No matter the order the area between x1 and x2, and y1 and y2 is filled.
displaycolor-space reference for display space.

Definition at line 1239 of file rectop.c.

References buf_rectfill_area(), col, ImBuf::rect, ImBuf::rect_float, ImBuf::x, x2, ImBuf::y, and y1.

◆ IMB_rectfill_area_replace()

void IMB_rectfill_area_replace ( const struct ImBuf ibuf,
const float  col[4],
int  x1,
int  y1,
int  x2,
int  y2 
)

Replace pixels of image area with solid color.

Parameters
ibufan image to be filled with color. It must be 4 channel image.
colRGBA color, which is assigned directly to both byte (via scaling) and float buffers.
x1,y1,x2,y2(x1, y1) defines starting point of the rectangular area to be filled, (x2, y2) is the end point. Note that values are allowed to be loosely ordered, which means that x2 is allowed to be lower than x1, as well as y2 is allowed to be lower than y1. No matter the order the area between x1 and x2, and y1 and y2 is filled.

Referenced by do_text_effect().

◆ IMB_refImBuf()

void IMB_refImBuf ( struct ImBuf ibuf)

◆ IMB_remakemipmap()

void IMB_remakemipmap ( struct ImBuf ibuf,
int  use_filter 
)

Thread-safe version, only recreates existing maps.

Definition at line 537 of file filter.c.

References ImBuf::flags, IMB_allocImBuf(), imb_filterN(), IMB_freeImBuf(), IMB_MIPMAP_LEVELS, imb_onehalf_no_alloc(), ImBuf::miplevel, ImBuf::mipmap, ImBuf::miptot, ImBuf::planes, ImBuf::x, and ImBuf::y.

Referenced by image_mipmap_test().

◆ IMB_sampleImageAtLocation()

void IMB_sampleImageAtLocation ( struct ImBuf ibuf,
float  x,
float  y,
bool  make_linear_rgb,
float  color[4] 
)

◆ IMB_saturation()

void IMB_saturation ( struct ImBuf ibuf,
float  sat 
)

◆ IMB_saveiff()

bool IMB_saveiff ( struct ImBuf ibuf,
const char *  filepath,
int  flags 
)

◆ IMB_scalefastImBuf()

bool IMB_scalefastImBuf ( struct ImBuf ibuf,
unsigned int  newx,
unsigned int  newy 
)

◆ IMB_scaleImBuf()

bool IMB_scaleImBuf ( struct ImBuf ibuf,
unsigned int  newx,
unsigned int  newy 
)

◆ IMB_scaleImBuf_threaded()

void IMB_scaleImBuf_threaded ( struct ImBuf ibuf,
unsigned int  newx,
unsigned int  newy 
)

◆ IMB_stereo3d_from_rect()

int* IMB_stereo3d_from_rect ( const struct ImageFormatData im_format,
size_t  x,
size_t  y,
size_t  channels,
int *  rect_left,
int *  rect_right 
)

◆ IMB_stereo3d_from_rectf()

float* IMB_stereo3d_from_rectf ( const struct ImageFormatData im_format,
size_t  x,
size_t  y,
size_t  channels,
float rectf_left,
float rectf_right 
)

◆ IMB_stereo3d_ImBuf()

struct ImBuf* IMB_stereo3d_ImBuf ( const struct ImageFormatData im_format,
struct ImBuf ibuf_left,
struct ImBuf ibuf_right 
)

◆ IMB_stereo3d_read_dimensions()

void IMB_stereo3d_read_dimensions ( char  mode,
bool  is_squeezed,
size_t  width,
size_t  height,
size_t *  r_width,
size_t *  r_height 
)

◆ IMB_stereo3d_write_dimensions()

void IMB_stereo3d_write_dimensions ( char  mode,
bool  is_squeezed,
size_t  width,
size_t  height,
size_t *  r_width,
size_t *  r_height 
)

◆ IMB_suffix_anim()

void IMB_suffix_anim ( struct anim anim,
const char *  suffix 
)

Definition at line 314 of file anim_movie.c.

References BLI_strncpy(), and anim::suffix.

Referenced by seq_anim_add_suffix(), and seq_open_anim_file().

◆ IMB_testiffname()

struct ImBuf* IMB_testiffname ( const char *  filepath,
int  flags 
)

◆ IMB_thumb_load_image()

struct ImBuf* IMB_thumb_load_image ( const char *  filepath,
const size_t  max_thumb_size,
char  colorspace[IM_MAX_SPACE] 
)

◆ IMB_tile_cache_params()

void IMB_tile_cache_params ( int  totthread,
int  maxmem 
)

◆ IMB_tiles_to_rect()

void IMB_tiles_to_rect ( struct ImBuf ibuf)

◆ IMB_touch_gpu_texture()

struct GPUTexture* IMB_touch_gpu_texture ( const char *  name,
struct ImBuf ibuf,
int  w,
int  h,
int  layers,
bool  use_high_bitdepth 
)

The ibuf is only here to detect the storage type. The produced texture will have undefined content. It will need to be populated by using IMB_update_gpu_texture_sub().

Definition at line 179 of file util_gpu.c.

References GPU_texture_anisotropic_filter(), GPU_texture_create_2d(), GPU_texture_create_2d_array(), imb_gpu_get_format(), NULL, tex, and w().

Referenced by gpu_texture_create_tile_array().

◆ IMB_transform()

void IMB_transform ( const struct ImBuf src,
struct ImBuf dst,
eIMBTransformMode  mode,
eIMBInterpolationFilterMode  filter,
const float  transform_matrix[4][4],
const struct rctf src_crop 
)

Transform source image buffer onto destination image buffer using a transform matrix.

Parameters
srcImage buffer to read from.
dstImage buffer to write to. rect or rect_float must already be initialized.
  • dst buffer must be a 4 channel buffers.
  • Only one data type buffer will be used (rect_float has priority over rect)
modeCropping/Wrap repeat effect to apply during transformation.
filterInterpolation to use during sampling.
transform_matrixTransformation matrix to use. The given matrix should transform between dst pixel space to src pixel space. One unit is one pixel.
src_cropCropping region how to crop the source buffer. Should only be passed when mode is set to IMB_TRANSFORM_MODE_CROP_SRC. For any other mode this should be empty.

During transformation no data/color conversion will happens. When transforming between float images the number of channels of the source buffer may be between 1 and 4. When source buffer has one channel the data will be read as a gray scale value.

Definition at line 569 of file transform.cc.

References BLI_assert_msg, filter(), IMB_FILTER_NEAREST, IMB_TRANSFORM_MODE_CROP_SRC, src, and user_data.

Referenced by sequencer_preprocess_transform_crop(), and sequencer_thumbnail_transform().

◆ IMB_unpremultiply_alpha()

void IMB_unpremultiply_alpha ( struct ImBuf ibuf)

◆ IMB_update_gpu_texture_sub()

void IMB_update_gpu_texture_sub ( struct GPUTexture tex,
struct ImBuf ibuf,
int  x,
int  y,
int  z,
int  w,
int  h,
bool  use_high_bitdepth,
bool  use_premult 
)

Will update a GPUTexture using the content of the ImBuf. Only one layer will be updated. Will resize the ibuf if needed. Z is the layer to update. Unused if the texture is 2D.

Definition at line 198 of file util_gpu.c.

References data, GPU_texture_update_sub(), imb_gpu_get_data(), imb_gpu_get_format(), MEM_freeN, size(), tex, w(), x, ImBuf::x, y, ImBuf::y, and z.

Referenced by gpu_texture_create_tile_array().

◆ IMD_anim_get_offset()

double IMD_anim_get_offset ( struct anim anim)

Return the encoded start offset (in seconds) of the given anim.

Definition at line 1673 of file anim_movie.c.

References anim::start_offset.

Referenced by SEQ_add_movie_strip().

◆ ismovie()

int ismovie ( const char *  filepath)
Attention
Defined in anim_movie.c

Referenced by imb_get_anim_type().

◆ nearest_interpolation()

void nearest_interpolation ( const struct ImBuf in,
struct ImBuf out,
float  u,
float  v,
int  xout,
int  yout 
)

◆ nearest_interpolation_color()

void nearest_interpolation_color ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)

◆ nearest_interpolation_color_char()

void nearest_interpolation_color_char ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)

◆ nearest_interpolation_color_fl()

void nearest_interpolation_color_fl ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)

◆ nearest_interpolation_color_wrap()

void nearest_interpolation_color_wrap ( const struct ImBuf in,
unsigned char  outI[4],
float  outF[4],
float  u,
float  v 
)