Blender
V3.3
|
#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... | |
Functions | |
void | IMB_init (void) |
void | IMB_exit (void) |
struct ImBuf * | IMB_ibImageFromMemory (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE], const char *descr) |
struct ImBuf * | IMB_testiffname (const char *filepath, int flags) |
struct ImBuf * | IMB_loadiffname (const char *filepath, int flags, char colorspace[IM_MAX_SPACE]) |
struct ImBuf * | IMB_thumb_load_image (const char *filepath, const size_t max_thumb_size, char colorspace[IM_MAX_SPACE]) |
void | IMB_freeImBuf (struct ImBuf *ibuf) |
struct ImBuf * | IMB_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 ImBuf * | IMB_allocFromBufferOwn (unsigned int *rect, float *rectf, unsigned int w, unsigned int h, unsigned int channels) |
struct ImBuf * | IMB_allocFromBuffer (const unsigned int *rect, const float *rectf, unsigned int w, unsigned int h, unsigned int channels) |
void | IMB_refImBuf (struct ImBuf *ibuf) |
struct ImBuf * | IMB_makeSingleUser (struct ImBuf *ibuf) |
struct ImBuf * | IMB_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 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) |
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 anim * | IMB_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 ImBuf * | IMB_anim_absolute (struct anim *anim, int position, IMB_Timecode_Type tc, IMB_Proxy_Size preview_size) |
struct ImBuf * | IMB_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 ImBuf * | IMB_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 ImBuf * | IMB_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 ImBuf * | IMB_loadifffile (int file, const char *filepath, int flags, char colorspace[IM_MAX_SPACE], const char *descr) |
struct ImBuf * | IMB_half_x (struct ImBuf *ibuf1) |
struct ImBuf * | IMB_double_fast_x (struct ImBuf *ibuf1) |
struct ImBuf * | IMB_double_x (struct ImBuf *ibuf1) |
struct ImBuf * | IMB_half_y (struct ImBuf *ibuf1) |
struct ImBuf * | IMB_double_fast_y (struct ImBuf *ibuf1) |
struct ImBuf * | IMB_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) |
void * | imb_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 GPUTexture * | IMB_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 GPUTexture * | IMB_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) |
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) |
struct ImBuf * | IMB_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) |
#define FILTER_MASK_MARGIN 1 |
Definition at line 458 of file IMB_imbuf.h.
#define FILTER_MASK_NULL 0 |
Definition at line 457 of file IMB_imbuf.h.
#define FILTER_MASK_USED 2 |
Definition at line 459 of file IMB_imbuf.h.
#define IM_MAX_SPACE 64 |
Definition at line 49 of file IMB_imbuf.h.
typedef enum eIMBInterpolationFilterMode eIMBInterpolationFilterMode |
typedef enum eIMBTransformMode 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.
typedef enum IMB_BlendMode IMB_BlendMode |
typedef enum IMB_Proxy_Size IMB_Proxy_Size |
typedef enum IMB_Timecode_Type IMB_Timecode_Type |
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.
Definition at line 882 of file IMB_imbuf.h.
Enumerator | |
---|---|
IMB_FILTER_NEAREST | |
IMB_FILTER_BILINEAR |
Definition at line 349 of file IMB_imbuf.h.
enum 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.
Definition at line 892 of file IMB_imbuf.h.
enum IMB_BlendMode |
Definition at line 209 of file IMB_imbuf.h.
enum 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.
enum IMB_Timecode_Type |
Definition at line 316 of file IMB_imbuf.h.
Definition at line 270 of file allocimbuf.c.
References ImBuf::flags, IB_zbuffloat, imb_alloc_pixels(), IMB_freezbuffloatImBuf(), ImBuf::mall, NULL, ImBuf::x, ImBuf::y, and ImBuf::zbuf_float.
Referenced by IMB_ImBufFromStereo3d(), IMB_initImBuf(), imb_load_openexr(), and seq_render_scene_strip().
Definition at line 253 of file allocimbuf.c.
References ImBuf::flags, IB_zbuf, imb_alloc_pixels(), IMB_freezbufImBuf(), ImBuf::mall, NULL, ImBuf::x, ImBuf::y, and ImBuf::zbuf.
Referenced by imb_addrectImBuf(), IMB_ImBufFromStereo3d(), and IMB_initImBuf().
void bicubic_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 | ||
) |
Definition at line 80 of file imageprocess.c.
References BLI_bicubic_interpolation_char(), BLI_bicubic_interpolation_fl(), ImBuf::rect, ImBuf::rect_float, v, ImBuf::x, and ImBuf::y.
Referenced by bicubic_interpolation(), do_projectpaint_thread(), blender::compositor::MovieClipBaseOperation::execute_pixel_sampled(), blender::compositor::MultilayerColorOperation::execute_pixel_sampled(), and blender::compositor::sample_image_at_location().
void bilinear_interpolation | ( | const struct ImBuf * | in, |
struct ImBuf * | out, | ||
float | u, | ||
float | v, | ||
int | xout, | ||
int | yout | ||
) |
void bilinear_interpolation_color | ( | const struct ImBuf * | in, |
unsigned char | outI[4], | ||
float | outF[4], | ||
float | u, | ||
float | v | ||
) |
Definition at line 128 of file imageprocess.c.
References BLI_bilinear_interpolation_char(), BLI_bilinear_interpolation_fl(), ImBuf::rect, ImBuf::rect_float, v, ImBuf::x, and ImBuf::y.
Referenced by bilinear_interpolation(), blender::compositor::MovieClipBaseOperation::execute_pixel_sampled(), blender::compositor::MultilayerColorOperation::execute_pixel_sampled(), and blender::compositor::sample_image_at_location().
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().
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().
Definition at line 367 of file allocimbuf.c.
References ImBuf::channels, channels(), ImBuf::flags, IB_rectfloat, imb_alloc_pixels(), imb_freerectfloatImBuf(), ImBuf::mall, NULL, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by IMB_ImBufFromStereo3d(), IMB_initImBuf(), imb_load_openexr(), imb_loadpng(), IMB_stereo3d_ImBuf(), modifier_color_balance_apply(), seq_imbuf_to_sequencer_space(), and ubuf_ensure_compat_ibuf().
Definition at line 387 of file allocimbuf.c.
References addzbufImBuf(), ImBuf::flags, IB_rect, imb_alloc_pixels(), ImBuf::mall, MEM_freeN, NULL, ImBuf::planes, ImBuf::rect, ImBuf::x, and ImBuf::y.
Referenced by colormanagement_imbuf_make_display_space(), IMB_ImBufFromStereo3d(), IMB_initImBuf(), imb_load_dds(), imb_loadpng(), imb_loadwebp(), imb_onehalf_no_alloc(), IMB_rect_from_float(), IMB_stereo3d_ImBuf(), and ubuf_ensure_compat_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().
void* imb_alloc_pixels | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned int | channels, | ||
size_t | typesize, | ||
const char * | name | ||
) |
Exported for image tools in blender, to quickly allocate 32 bits rect.
Definition at line 354 of file allocimbuf.c.
References channels(), MEM_callocN, NULL, size(), SIZE_MAX, x, and y.
Referenced by addzbuffloatImBuf(), addzbufImBuf(), avi_converter_from_avi_rgb(), avi_converter_from_mjpeg(), avi_converter_from_rgb32(), avi_converter_to_mjpeg(), avi_converter_to_rgb32(), convertRGBAToLogElement(), imb_addrectfloatImBuf(), imb_addrectImBuf(), imb_loadpng(), logImageGetDataRGBA(), and logImageSetDataRGBA().
struct ImBuf* IMB_allocFromBuffer | ( | const unsigned int * | rect, |
const 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
Definition at line 447 of file allocimbuf.c.
References ImBuf::channels, channels(), ImBuf::flags, IB_rect, IB_rectfloat, IMB_allocImBuf(), ImBuf::mall, MEM_mallocN, NULL, ImBuf::rect, ImBuf::rect_float, size(), and w().
Referenced by BKE_main_thumbnail_to_imbuf(), imb_gpu_get_data(), imb_load_filepath_thumbnail_openexr(), studiolight_calculate_radiance_cubemap_buffers(), studiolight_load_equirect_image(), and update_do_scale().
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).
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().
struct ImBuf* IMB_allocImBuf | ( | unsigned int | x, |
unsigned int | y, | ||
unsigned char | planes, | ||
unsigned int | flags | ||
) |
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().
Test if color-space conversions of pixels in buffer need to take into account alpha.
Referenced by colormanage_imbuf_make_linear(), display_buffer_init_handle(), blender::draw::image_engine::SpaceNodeAccessor::get_shader_parameters(), blender::draw::image_engine::SpaceImageAccessor::get_shader_parameters(), IMB_colormanagement_imbuf_to_byte_texture(), and IMB_colormanagement_imbuf_to_float_texture().
Definition at line 449 of file imageprocess.c.
References Freestyle::a, mul(), x, and y.
Referenced by IMB_colormanagement_imbuf_for_write().
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().
struct ImBuf* IMB_anim_absolute | ( | struct anim * | anim, |
int | position, | ||
IMB_Timecode_Type | tc, | ||
IMB_Proxy_Size | preview_size | ||
) |
Definition at line 1571 of file anim_movie.c.
References an_stringdec(), an_stringenc(), ANIM_AVI, ANIM_FFMPEG, anim_getnew(), ANIM_MOVIE, ANIM_NONE, ANIM_SEQUENCE, BLI_snprintf(), anim::colorspace, anim::cur_position, anim::curtype, anim::duration_in_frames, anim::first, IB_animdeinterlace, anim::ib_flags, IB_rect, IMB_anim_absolute(), IMB_anim_index_get_frame_index(), IMB_anim_open_proxy(), IMB_convert_rgba_to_abgr(), IMB_filtery(), IMB_loadiffname(), IMB_PROXY_NONE, IMB_TC_NONE, movie_fetchibuf(), anim::name, ImBuf::name, and NULL.
Referenced by build_pict_list_ex(), ibuf_from_picture(), IMB_anim_absolute(), IMB_anim_previewframe(), load_movie_single(), movieclip_load_movie_file(), openanim(), seq_proxy_fetch(), seq_render_movie_strip_custom_file_proxy(), seq_render_movie_strip_view(), thumb_create_ex(), and wm_main_playanim_intern().
Definition at line 295 of file anim_movie.c.
References anim::avi, NULL, and UNUSED_VARS.
Referenced by SEQ_add_movie_reload_if_needed().
int IMB_anim_get_duration | ( | struct anim * | anim, |
IMB_Timecode_Type | tc | ||
) |
Return the length (in frames) of the given anim.
Definition at line 1658 of file anim_movie.c.
References anim::duration_in_frames, IMB_anim_open_index(), IMB_indexer_get_duration(), and IMB_TC_NONE.
Referenced by build_pict_list_ex(), image_match_len_exec(), load_movie_single(), movieclip_calc_length(), prefetch_data_fn(), SEQ_add_movie_strip(), SEQ_add_reload_new_file(), and uiTemplateImageInfo().
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().
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().
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().
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().
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().
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().
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 | ||
) |
Prepare context for proxies/time-codes builder
Definition at line 1377 of file indexer.c.
References ANIM_FFMPEG, BLI_gset_ensure_p_ex(), BLI_strdup(), blender::compositor::context, anim::curtype, FILE_MAX, get_proxy_filepath(), IMB_anim_proxy_get_existing(), IMB_PROXY_MAX_SLOT, NULL, proxy_sizes, and UNUSED_VARS.
Referenced by clip_rebuild_proxy_exec(), and SEQ_proxy_rebuild_context().
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().
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_Proxy_Size IMB_anim_proxy_get_existing | ( | struct anim * | anim | ) |
Definition at line 1601 of file indexer.c.
References BLI_exists(), FILE_MAX, get_proxy_filepath(), IMB_PROXY_MAX_SLOT, and proxy_sizes.
Referenced by IMB_anim_index_rebuild_context(), and seq_proxy_need_rebuild().
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().
void IMB_blend_color_byte | ( | unsigned char | dst[4], |
const unsigned char | src1[4], | ||
const unsigned char | src2[4], | ||
IMB_BlendMode | mode | ||
) |
Definition at line 24 of file rectop.c.
References blend_color_add_alpha_byte(), blend_color_add_byte(), blend_color_burn_byte(), blend_color_color_byte(), blend_color_darken_byte(), blend_color_difference_byte(), blend_color_dodge_byte(), blend_color_erase_alpha_byte(), blend_color_exclusion_byte(), blend_color_hardlight_byte(), blend_color_hue_byte(), blend_color_lighten_byte(), blend_color_linearburn_byte(), blend_color_linearlight_byte(), blend_color_luminosity_byte(), blend_color_mix_byte(), blend_color_mul_byte(), blend_color_overlay_byte(), blend_color_pinlight_byte(), blend_color_saturation_byte(), blend_color_screen_byte(), blend_color_softlight_byte(), blend_color_sub_byte(), blend_color_vividlight_byte(), 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_projectpaint_clone(), do_projectpaint_draw(), do_projectpaint_mask(), do_projectpaint_thread(), paint_2d_bucket_fill(), and paint_2d_gradient_fill().
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().
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 | ||
) |
Byte to byte pixels, input and output 4-channel RGBA.
Definition at line 627 of file divers.c.
References BLI_assert, from, height, IB_PROFILE_LINEAR_RGB, IB_PROFILE_NONE, IB_PROFILE_SRGB, linearrgb_to_srgb_predivide_v4(), linearrgb_to_srgb_v4(), rgba_float_to_uchar(), rgba_uchar_to_float(), srgb_to_linearrgb_predivide_v4(), srgb_to_linearrgb_v4(), width, x, and y.
Referenced by do_display_buffer_apply_thread(), and imb_stereo3d_squeeze_rect().
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 | ||
) |
Float to byte pixels, output 4-channel RGBA.
Definition at line 94 of file divers.c.
References BLI_assert, clear_dither_context(), create_dither_context(), float_to_byte_dither_v4(), from, height, IB_PROFILE_LINEAR_RGB, IB_PROFILE_NONE, IB_PROFILE_SRGB, linearrgb_to_srgb_ushort4(), linearrgb_to_srgb_v3_v3(), NULL, premul_to_straight_v4_v4(), rgb_float_to_uchar(), rgba_float_to_uchar(), srgb_to_linearrgb_predivide_v4(), srgb_to_linearrgb_v3_v3(), srgb_to_linearrgb_v4(), t, unit_float_to_uchar_clamp(), ushort_to_byte_dither_v4(), ushort_to_byte_v4(), width, x, and y.
Referenced by do_display_buffer_apply_thread(), do_glow_effect_byte(), IMB_display_buffer_transform_apply(), IMB_rect_from_float(), partial_buffer_update_rect(), write_external_bake_pixels(), and write_internal_bake_pixels().
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 | ||
) |
Float to byte pixels, output 4-channel RGBA.
Definition at line 260 of file divers.c.
References clear_dither_context(), create_dither_context(), FILTER_MASK_USED, float_to_byte_dither_v4(), from, height, mask(), NULL, premul_to_straight_v4_v4(), rgb_float_to_uchar(), rgba_float_to_uchar(), t, unit_float_to_uchar_clamp(), width, x, and y.
Referenced by write_internal_bake_pixels().
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 | ||
) |
Byte to float pixels, input and output 4-channel RGBA.
Definition at line 350 of file divers.c.
References BLI_assert, from, height, IB_PROFILE_LINEAR_RGB, IB_PROFILE_NONE, IB_PROFILE_SRGB, linearrgb_to_srgb_predivide_v4(), linearrgb_to_srgb_v4(), rgba_uchar_to_float(), srgb_to_linearrgb_uchar4(), srgb_to_linearrgb_uchar4_predivide(), width, x, and y.
Referenced by do_display_buffer_apply_thread(), do_glow_effect_byte(), do_processor_transform_thread(), IMB_colormanagement_transform_from_byte(), IMB_colormanagement_transform_from_byte_threaded(), IMB_float_from_rect_ex(), and partial_buffer_update_rect().
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 | ||
) |
Float to float pixels, output 4-channel RGBA.
Definition at line 409 of file divers.c.
References BLI_assert, copy_v3_v3(), from, height, IB_PROFILE_LINEAR_RGB, IB_PROFILE_NONE, IB_PROFILE_SRGB, linearrgb_to_srgb_predivide_v4(), linearrgb_to_srgb_v3_v3(), linearrgb_to_srgb_v4(), srgb_to_linearrgb_predivide_v4(), srgb_to_linearrgb_v3_v3(), srgb_to_linearrgb_v4(), width, x, and y.
Referenced by blender::compositor::ConvertColorProfileOperation::execute_pixel_sampled(), imb_buffer_float_from_float_thread_do(), IMB_buffer_float_from_float_threaded(), imb_stereo3d_squeeze_rectf(), studiolight_multilayer_convert_pass(), write_external_bake_pixels(), and write_internal_bake_pixels().
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().
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 | ||
) |
Definition at line 536 of file divers.c.
References data, height, IMB_buffer_float_from_float(), imb_buffer_float_from_float_thread_do(), IMB_processor_apply_threaded_scanlines(), and width.
Referenced by BKE_image_buf_fill_checker_color().
Definition at line 873 of file divers.c.
References height, straight_to_premul_v4(), and width.
Referenced by do_glow_effect_byte().
Definition at line 863 of file divers.c.
References height, premul_to_straight_v4(), and width.
Referenced by do_glow_effect_byte().
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().
Definition at line 224 of file anim_movie.c.
References IMB_free_indices(), and NULL.
Referenced by proxy_endjob(), and SEQ_proxy_rebuild_finish().
No profile conversion.
Definition at line 844 of file divers.c.
References if(), IMB_colormanagement_get_luminance(), IMB_colormanagement_get_luminance_byte(), IMB_get_rect_len(), ImBuf::rect, and ImBuf::rect_float.
Referenced by RE_render_result_rect_to_ibuf(), and screenshot_exec().
Change the ordering of the color bytes pointed to by rect from rgba to abgr. size * 4 color bytes are reordered.
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().
struct GPUTexture* IMB_create_gpu_texture | ( | const char * | name, |
struct ImBuf * | ibuf, | ||
bool | use_high_bitdepth, | ||
bool | use_premult | ||
) |
Definition at line 227 of file util_gpu.c.
References BLI_assert, data, DDSData::data, ImBuf::dds_data, ImBuf::ftype, GPU_texture_anisotropic_filter(), GPU_texture_create_2d(), GPU_texture_create_compressed_2d(), GPU_texture_size_with_limit(), GPU_texture_update(), imb_gpu_get_data(), imb_gpu_get_format(), is_power_of_2_i(), max_ii(), MEM_freeN, NULL, DDSData::nummipmaps, size(), tex, UNPACK2, ImBuf::x, and ImBuf::y.
Referenced by BKE_movieclip_get_gpu_texture(), and image_get_gpu_texture().
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().
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().
Definition at line 152 of file scaling.c.
References IMB_double_fast_x(), imb_filterx(), NULL, ImBuf::rect, and ImBuf::rect_float.
Definition at line 307 of file scaling.c.
References IMB_double_fast_y(), IMB_filtery(), NULL, and ImBuf::rect.
Referenced by accessor_get_ibuf(), BKE_tracking_distortion_exec(), blend_file_thumb_from_camera(), blend_file_thumb_from_screenshot(), brush_copy_data(), create_mono_icon_with_border(), do_render_sequencer(), do_render_strip_uncached(), do_speed_effect(), icon_copy_rect(), image_save_single(), IMB_half_x(), IMB_half_y(), imbuf_ensure_editable(), Freestyle::Canvas::loadMap(), movieclip_build_proxy_ibuf(), postprocess_frame(), py_imbuf_copy(), RE_render_result_rect_to_ibuf(), screen_opengl_render_doit(), SEQ_get_thumbnail(), SEQ_modifier_apply_stack(), seq_proxy_build_frame(), sequencer_get_scope(), and sequencer_make_scope().
Definition at line 25 of file module.c.
References colormanagement_exit(), imb_filetypes_exit(), imb_mmap_lock_exit(), imb_refcounter_lock_exit(), and imb_tile_cache_exit().
Referenced by BKE_blender_free(), blender::bke::image::partial_update::ImagePartialUpdateTest::TearDown(), blender::bke::tests::TEST(), wm_main_playanim_intern(), and blender::bke::tests::Context< TestData >::~Context().
Referenced by arg_handle_playback_mode(), and main().
const char* IMB_ffmpeg_last_error | ( | void | ) |
Definition at line 301 of file filter.c.
References imb_filterx(), and IMB_filtery().
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().
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().
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().
Definition at line 16 of file rotate.c.
References bottom, float(), MEM_freeN, MEM_mallocN, NULL, ImBuf::rect, ImBuf::rect_float, stride, top, ImBuf::x, and ImBuf::y.
Referenced by imb_load_dds(), imb_load_dpx_cineon(), imb_load_filepath_thumbnail_openexr(), imb_loadhdr(), imb_loadtarga(), and input_preprocess().
Definition at line 805 of file divers.c.
References BLI_rcti_init(), ImBuf::channels, ImBuf::flags, IB_rectfloat, IMB_float_from_rect_ex(), IMB_get_rect_len(), ImBuf::mall, MEM_callocN, NULL, ImBuf::rect, ImBuf::rect_float, size(), ImBuf::x, and ImBuf::y.
Referenced by accessor_get_ibuf(), colorfn(), FloatBufferCache::ensure_float_buffer(), blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction::ImageFieldsFunction(), IMB_colormanagement_imbuf_for_write(), blender::compositor::MovieClipBaseOperation::init_execution(), modifier_render_mask_input(), paint_2d_canvas_set(), project_paint_op(), RE_layer_load_from_file(), RE_render_result_rect_to_ibuf(), studiolight_load_equirect_image(), and studiolight_load_irradiance_equirect_image().
void IMB_float_from_rect_ex | ( | struct ImBuf * | dst, |
const struct ImBuf * | src, | ||
const struct rcti * | region_to_update | ||
) |
Definition at line 193 of file anim_movie.c.
References free_anim_movie(), IMB_free_indices(), IMB_metadata_free(), MEM_freeN, anim::metadata, and NULL.
Referenced by free_buffers(), free_proxy_seq(), image_free_anims(), IMB_close_anim(), openanim(), prefetch_data_fn(), seq_free_strip(), SEQ_relations_sequence_free_anim(), and thumb_create_ex().
Definition at line 192 of file allocimbuf.c.
References BLI_spin_lock(), BLI_spin_unlock(), colormanage_cache_free(), DDSData::data, ImBuf::dds_data, free(), imb_freerectImbuf_all(), IMB_metadata_free(), MEM_freeN, ImBuf::metadata, NULL, ImBuf::refcounter, and refcounter_spin.
Referenced by IMB_allocImBuf(), IMB_dupImBuf(), imb_freemipmapImBuf(), and IMB_makeSingleUser().
Definition at line 64 of file allocimbuf.c.
References Freestyle::a, IMB_freeImBuf(), IMB_MIPMAP_LEVELS, ImBuf::mipmap, ImBuf::miptot, and NULL.
Referenced by finish_images(), imb_freerectfloatImBuf(), imb_freerectImBuf(), IMB_makemipmap(), and write_internal_bake_pixels().
Any free ibuf->rect
frees mipmaps to be sure, creation is in render on first request.
Definition at line 80 of file allocimbuf.c.
References IB_rectfloat, imb_freemipmapImBuf(), ImBuf::mall, MEM_freeN, NULL, and ImBuf::rect_float.
Referenced by image_save_post(), imb_addrectfloatImBuf(), imb_freerectImbuf_all(), IMB_scalefastImBuf(), IMB_scaleImBuf_threaded(), IMB_thumb_manage(), project_paint_end(), q_scale_linear_interpolation(), scaledownx(), scaledowny(), scaleupx(), scaleupy(), screen_opengl_render_doit(), thumb_create_ex(), and ubuf_ensure_compat_ibuf().
Any free ibuf->rect
frees mipmaps to be sure, creation is in render on first request.
Definition at line 97 of file allocimbuf.c.
References IB_rect, imb_freemipmapImBuf(), ImBuf::mall, MEM_freeN, NULL, and ImBuf::rect.
Referenced by BKE_tracking_distortion_exec(), colormanage_imbuf_make_linear(), image_get_render_result(), image_save_post(), IMB_colormanagement_imbuf_for_write(), imb_freerectImbuf_all(), IMB_scalefastImBuf(), IMB_scaleImBuf_threaded(), input_preprocess(), modifier_color_balance_apply(), project_paint_end(), q_scale_linear_interpolation(), scaledownx(), scaledowny(), scaleupx(), scaleupy(), seq_imbuf_to_sequencer_space(), seq_render_image_strip_view(), and seq_render_movie_strip_view().
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().
Definition at line 113 of file allocimbuf.c.
References IB_tiles, imb_tile_cache_tile_free(), ImBuf::mall, MEM_freeN, NULL, ImBuf::tiles, ImBuf::xtiles, and ImBuf::ytiles.
Referenced by imb_freerectImbuf_all().
Definition at line 168 of file allocimbuf.c.
References IB_zbuffloat, ImBuf::mall, MEM_freeN, NULL, and ImBuf::zbuf_float.
Referenced by addzbuffloatImBuf(), BKE_image_format_to_imbuf(), image_save_post(), imb_freerectImbuf_all(), and scalefast_Z_ImBuf().
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().
int imb_get_anim_type | ( | const char * | filepath | ) |
Definition at line 324 of file util.c.
References ANIM_AVI, ANIM_FFMPEG, ANIM_MOVIE, ANIM_NONE, ANIM_SEQUENCE, BLI_assert, BLI_path_is_rel(), BLI_stat(), IMB_ispic(), isavi(), ismovie(), usdtokens::st(), and UTIL_DEBUG.
Referenced by anim_getnew(), and IMB_isanim().
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).
Referenced by IMB_color_to_bw(), IMB_float_from_rect(), IMB_saturation(), scaledownx(), and scaledowny().
size_t IMB_get_size_in_memory | ( | struct ImBuf * | ibuf | ) |
Approximate size of ImBuf in memory
Definition at line 655 of file allocimbuf.c.
References Freestyle::a, ImBuf::channels, float(), IMB_get_size_in_memory(), ImBuf::mipmap, ImBuf::miptot, ImBuf::rect, ImBuf::rect_float, size(), ImBuf::tiles, ImBuf::x, ImBuf::xtiles, ImBuf::y, and ImBuf::ytiles.
Referenced by frame_cache_add(), get_size_in_memory(), and IMB_get_size_in_memory().
Definition at line 610 of file filter.c.
References CLAMP, ImBuf::mipmap, and ImBuf::miptot.
Referenced by IMB_tiles_to_rect().
unsigned int* IMB_gettile | ( | struct ImBuf * | ibuf, |
int | tx, | ||
int | ty, | ||
int | thread | ||
) |
Definition at line 421 of file cache.c.
References GLOBAL_CACHE, imb_thread_cache_get_tile(), and ImGlobalTileCache::thread_cache.
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.
Definition at line 82 of file scaling.c.
References ImBuf::flags, IMB_allocImBuf(), IMB_dupImBuf(), imb_half_x_no_alloc(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by IMB_onehalf().
Definition at line 235 of file scaling.c.
References ImBuf::flags, IMB_allocImBuf(), IMB_dupImBuf(), imb_half_y_no_alloc(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by IMB_onehalf().
struct ImBuf* IMB_ibImageFromMemory | ( | const unsigned char * | mem, |
size_t | size, | ||
int | flags, | ||
char | colorspace[IM_MAX_SPACE], | ||
const char * | descr | ||
) |
Definition at line 84 of file readimage.c.
References BLI_strncpy(), IB_test, IM_MAX_SPACE, IMB_FILE_TYPES, IMB_FILE_TYPES_LAST, imb_handle_alpha(), NULL, size(), and type.
Referenced by filelist_init_icons(), ibuf_from_picture(), icon_verify_datatoc(), IMB_loadifffile(), load_image_single(), prefetch_task_func(), proxy_task_func(), UI_icon_alert_imbuf_get(), UI_icon_to_preview(), UI_icons_reload_internal_textures(), wm_block_create_about(), and wm_block_splash_image().
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().
Definition at line 16 of file module.c.
References colormanagement_init(), imb_filetypes_init(), imb_mmap_lock_init(), imb_refcounter_lock_init(), and imb_tile_cache_init().
Referenced by blender::bke::tests::Context< TestData >::Context(), main(), blender::bke::image::partial_update::ImagePartialUpdateTest::SetUp(), BlendfileLoadingBaseTest::SetUpTestCase(), and blender::bke::tests::TEST().
bool IMB_initImBuf | ( | struct ImBuf * | ibuf, |
unsigned int | x, | ||
unsigned int | y, | ||
unsigned char | planes, | ||
unsigned int | flags | ||
) |
Initialize given ImBuf.
Use in cases when temporary image buffer is allocated on stack.
Definition at line 516 of file allocimbuf.c.
References addzbuffloatImBuf(), addzbufImBuf(), ImBuf::channels, colormanage_imbuf_set_default_spaces(), ImBuf::flags, ImBuf::foptions, ImBuf::ftype, IB_rect, IB_rectfloat, IB_zbuf, IB_zbuffloat, imb_addrectfloatImBuf(), imb_addrectImBuf(), IMB_DPI_DEFAULT, IMB_FTYPE_PNG, ImBuf::planes, ImBuf::ppm, ImbFormatOptions::quality, x, ImBuf::x, y, and ImBuf::y.
Referenced by IMB_allocImBuf(), and paint_2d_do_making_brush().
bool IMB_isanim | ( | const char * | filepath | ) |
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().
bool IMB_ispic | ( | const char * | filepath | ) |
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().
int IMB_ispic_type | ( | const char * | filepath | ) |
Definition at line 151 of file util.c.
References HEADER_SIZE, IMB_FTYPE_NONE, imb_ispic_read_header_from_filepath(), and IMB_ispic_type_from_memory().
Referenced by IMB_ispic(), and IMB_thumb_load_image().
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().
bool IMB_ispic_type_matches | ( | const char * | filepath, |
int | filetype | ||
) |
Definition at line 161 of file util.c.
References BLI_assert, HEADER_SIZE, IMB_file_type_from_ftype(), imb_ispic_read_header_from_filepath(), NULL, and type.
Referenced by imb_load_photoshop().
struct ImBuf* IMB_loadifffile | ( | int | file, |
const char * | filepath, | ||
int | flags, | ||
char | colorspace[IM_MAX_SPACE], | ||
const char * | descr | ||
) |
Definition at line 156 of file readimage.c.
References BLI_file_descriptor_size(), BLI_mmap_free(), BLI_mmap_get_pointer(), BLI_mmap_open(), file, IMB_ibImageFromFile(), IMB_ibImageFromMemory(), imb_is_filepath_format(), imb_mmap_lock(), imb_mmap_unlock(), NULL, and size().
Referenced by IMB_loadiffname(), IMB_testiffname(), and M_imbuf_load().
struct ImBuf* IMB_loadiffname | ( | const char * | filepath, |
int | flags, | ||
char | colorspace[IM_MAX_SPACE] | ||
) |
Definition at line 209 of file readimage.c.
References Freestyle::a, BLI_assert, BLI_open(), BLI_path_is_rel(), BLI_strncpy(), ImBuf::cachename, file, imb_cache_filename(), IMB_FILENAME_SIZE, IMB_loadifffile(), ImBuf::mipmap, ImBuf::miptot, ImBuf::name, NULL, and O_BINARY.
Referenced by anim_getnew(), ibuf_from_picture(), icon_preview_imbuf_from_brush(), image_init_color_management(), IMB_anim_absolute(), IMB_thumb_load_image(), IMB_thumb_manage(), IMB_thumb_read(), init_iconfile_list(), init_internal_icons(), load_image_single(), Freestyle::Canvas::loadMap(), movieclip_load_sequence_file(), RE_layer_load_from_file(), SEQ_add_image_init_alpha_mode(), SEQ_add_image_strip(), seq_proxy_fetch(), seq_render_image_strip_view(), studiolight_load_equirect_image(), studiolight_load_irradiance_equirect_image(), wm_block_splash_image(), and wm_main_playanim_intern().
Frees too (if there) and recreates new data.
Definition at line 573 of file filter.c.
References ImBuf::channels, ImBuf::flags, IMB_allocImBuf(), imb_filterN(), IMB_freeImBuf(), imb_freemipmapImBuf(), IMB_MIPMAP_LEVELS, IMB_onehalf(), ImBuf::miplevel, ImBuf::mipmap, ImBuf::miptot, ImBuf::planes, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by image_mipmap_test().
Definition at line 227 of file allocimbuf.c.
References BLI_spin_lock(), BLI_spin_unlock(), IMB_dupImBuf(), IMB_freeImBuf(), IMB_metadata_copy(), NULL, ImBuf::refcounter, and refcounter_spin.
Referenced by input_preprocess(), and load_movie_single().
Definition at line 351 of file filter.c.
References col, mask(), ImBuf::rect, ImBuf::rect_float, x, ImBuf::x, y, and ImBuf::y.
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.
Definition at line 433 of file scaling.c.
References ImBuf::flags, IMB_allocImBuf(), IMB_half_x(), IMB_half_y(), imb_onehalf_no_alloc(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by IMB_makemipmap().
struct anim* IMB_open_anim | ( | const char * | name, |
int | ib_flags, | ||
int | streamindex, | ||
char | colorspace[IM_MAX_SPACE] | ||
) |
Definition at line 268 of file anim_movie.c.
References BLI_assert, BLI_path_is_rel(), BLI_strncpy(), COLOR_ROLE_DEFAULT_BYTE, anim::colorspace, colorspace_set_default_role(), anim::ib_flags, IM_MAX_SPACE, MEM_callocN, anim::name, NULL, and anim::streamindex.
Referenced by build_pict_list_ex(), IMB_anim_open_proxy(), openanim(), openanim_noload(), thumb_create_ex(), and wm_main_playanim_intern().
Definition at line 662 of file filter.c.
References ImBuf::channels, IMB_premultiply_rect(), IMB_premultiply_rect_float(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by BKE_previewimg_ensure(), imb_handle_alpha(), UI_icon_alert_imbuf_get(), UI_icons_reload_internal_textures(), wm_block_create_about(), and wm_block_splash_image().
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 * | ||
) |
Threaded processors.
Definition at line 355 of file imageprocess.c.
References BLI_task_pool_create(), BLI_task_pool_free(), BLI_task_pool_push(), BLI_task_pool_work_and_wait(), handles, MEM_callocN, MEM_freeN, NULL, processor_apply_func(), task_pool, and TASK_PRIORITY_HIGH.
Referenced by display_buffer_apply_threaded(), do_gaussian_blur_effect(), IMB_scaleImBuf_threaded(), modifier_apply_threaded(), modifier_color_balance_apply(), processor_transform_apply_threaded(), and seq_render_effect_execute_threaded().
void IMB_processor_apply_threaded_scanlines | ( | int | total_scanlines, |
ScanlineThreadFunc | do_thread, | ||
void * | custom_data | ||
) |
Definition at line 415 of file imageprocess.c.
References BLI_parallel_range_settings_defaults(), BLI_task_parallel_range(), data, and processor_apply_parallel().
Referenced by BKE_image_buf_fill_checker(), BKE_image_buf_fill_checker_color(), BKE_image_buf_fill_color(), IMB_buffer_float_from_float_threaded(), imb_partial_display_buffer_update_ex(), IMB_rectblend_threaded(), and blender::imbuf::transform::transform_threaded().
In-place image crop.
Referenced by py_imbuf_crop(), screenshot_exec(), SEQ_get_thumbnail(), and UI_icon_alert_imbuf_get().
Create char buffer, color corrected if necessary, for ImBufs that lack one.
Definition at line 696 of file divers.c.
References buffer, ImBuf::channels, COLOR_ROLE_DEFAULT_BYTE, COLOR_ROLE_SCENE_LINEAR, ImBuf::dither, ImBuf::float_colorspace, IB_PROFILE_SRGB, IB_RECT_INVALID, imb_addrectImBuf(), IMB_alpha_affects_rgb(), IMB_buffer_byte_from_float(), IMB_colormanagement_role_colorspace_name_get(), IMB_colormanagement_transform(), IMB_unpremultiply_rect_float(), MEM_dupallocN, MEM_freeN, ColorSpace::name, NULL, ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, ImBuf::userflags, ImBuf::x, and ImBuf::y.
Referenced by BKE_main_thumbnail_from_imbuf(), ED_view3d_draw_offscreen_imbuf(), gpencil_render_offscreen(), icon_copy_rect(), image_flip_exec(), image_invert_exec(), IMB_colormanagement_imbuf_for_write(), imb_load_jp2_stream(), imb_load_openexr(), imb_loadhdr(), imb_loadiris(), imb_save_dpx_cineon(), IMB_saveiff(), IMB_thumb_manage(), modifier_render_mask_input(), paint_2d_canvas_set(), prepare_effect_imbufs(), project_paint_op(), blender::ed::space_node::sample_apply(), screen_opengl_render_doit(), sequencer_draw_display_buffer(), and thumb_create_ex().
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().
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 | ||
) |
Referenced by paint_2d_do_making_brush(), paint_2d_lift_clone(), and paint_2d_lift_smear().
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().
drect | An image to be filled with color. It must be 4 channel image. |
col | RGBA 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().
Definition at line 1262 of file rectop.c.
References ImBuf::channels, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by bake_ibuf_filter(), imb_handle_alpha(), and RE_bake_margin().
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.
ibuf | an image to be filled with color. It must be 4 channel image. |
col | RGBA 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. |
display | color-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.
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.
ibuf | an image to be filled with color. It must be 4 channel image. |
col | RGBA 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().
Increase reference count to imbuf (to delete an imbuf you have to call freeImBuf as many times as it is referenced)
Definition at line 220 of file allocimbuf.c.
References BLI_spin_lock(), BLI_spin_unlock(), ImBuf::refcounter, and refcounter_spin.
Referenced by BKE_image_get_first_ibuf(), BKE_image_get_ibuf_with_name(), do_moviecache_put(), get_postprocessed_cached_frame(), get_stable_cached_frame(), IMB_moviecache_get(), put_postprocessed_frame_to_cache(), put_stabilized_frame_to_cache(), seq_cache_get_ex(), and seq_cache_put_ex().
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().
void IMB_sampleImageAtLocation | ( | struct ImBuf * | ibuf, |
float | x, | ||
float | y, | ||
bool | make_linear_rgb, | ||
float | color[4] | ||
) |
Sample pixel of image using NEAREST method.
Definition at line 484 of file imageprocess.c.
References color, IMB_colormanagement_colorspace_to_scene_linear_v4(), nearest_interpolation_color(), NULL, ImBuf::rect_colorspace, ImBuf::rect_float, rgba_uchar_to_float(), x, and y.
Referenced by BKE_gpencil_from_image(), and palette_extract_img_exec().
Definition at line 889 of file divers.c.
References hsv_to_rgb(), if(), IMB_get_rect_len(), ImBuf::rect, ImBuf::rect_float, usdtokens::rgb(), rgb_float_to_uchar(), rgb_to_hsv_v(), and rgb_uchar_to_float().
Referenced by input_preprocess().
Definition at line 22 of file writeimage.c.
References BLI_assert, BLI_path_is_rel(), COLOR_ROLE_DEFAULT_BYTE, colormanage_colorspace_get_roled(), ImBuf::flags, IM_FTYPE_FLOAT, IMB_file_type_from_ibuf(), IMB_rect_from_float(), NULL, ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, and type.
Referenced by BKE_imbuf_write(), dynamicPaint_outputSurfaceImage(), blender::compositor::DebugInfo::export_operation(), image_memorypack_imbuf(), image_save_sequence_exec(), Freestyle::Canvas::loadMap(), M_imbuf_write(), movieclip_build_proxy_ibuf(), Freestyle::SteerableViewMap::saveSteerableViewMap(), seq_proxy_build_frame(), studiolight_calculate_radiance_cubemap_buffers(), and thumb_create_ex().
Definition at line 1689 of file scaling.c.
References BLI_assert_msg, IB_rect, IB_rectfloat, imb_freerectfloatImBuf(), imb_freerectImBuf(), ImBuf::mall, MEM_freeN, MEM_mallocN, NULL, ImBuf::rect, ImBuf::rect_float, scalefast_Z_ImBuf(), x, ImBuf::x, y, and ImBuf::y.
Referenced by icon_copy_rect(), py_imbuf_resize(), and seq_proxy_build_frame().
Return true if ibuf is modified.
Definition at line 1644 of file scaling.c.
References BLI_assert_msg, NULL, q_scale_linear_interpolation(), ImBuf::rect, ImBuf::rect_float, scaledownx(), scaledowny(), scalefast_Z_ImBuf(), scaleupx(), scaleupy(), x, ImBuf::x, y, and ImBuf::y.
Referenced by accessor_get_ibuf(), BKE_image_scale(), BKE_previewimg_ensure(), blend_file_thumb_from_camera(), blend_file_thumb_from_screenshot(), get_undistorted_ibuf(), icon_verify_datatoc(), image_scale_exec(), imb_gpu_get_data(), Freestyle::Canvas::loadMap(), movieclip_build_proxy_ibuf(), py_imbuf_resize(), thumb_create_ex(), ui_draw_but_IMAGE(), update_do_scale(), wm_block_create_about(), and wm_block_splash_image().
Definition at line 1863 of file scaling.c.
References BLI_assert_msg, ImBuf::channels, do_scale_thread(), IB_rect, IB_rectfloat, imb_freerectfloatImBuf(), imb_freerectImBuf(), IMB_processor_apply_threaded(), init_data(), ImBuf::mall, MEM_mallocN, NULL, ImBuf::rect, ImBuf::rect_float, scale_thread_init(), ImBuf::x, and ImBuf::y.
Referenced by imb_stereo3d_squeeze_ImBuf(), imb_stereo3d_squeeze_rect(), imb_stereo3d_squeeze_rectf(), imb_stereo3d_unsqueeze_ImBuf(), and movieclip_build_proxy_ibuf().
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 | ||
) |
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 | ||
) |
struct ImBuf* IMB_stereo3d_ImBuf | ( | const struct ImageFormatData * | im_format, |
struct ImBuf * | ibuf_left, | ||
struct ImBuf * | ibuf_right | ||
) |
Left/right are always float.
Referenced by BKE_image_render_write(), blender::compositor::OutputStereoOperation::deinit_execution(), image_save_single(), and RE_WriteRenderViewsMovie().
void IMB_stereo3d_read_dimensions | ( | char | mode, |
bool | is_squeezed, | ||
size_t | width, | ||
size_t | height, | ||
size_t * | r_width, | ||
size_t * | r_height | ||
) |
Definition at line 535 of file stereoimbuf.c.
References height, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, and width.
Referenced by IMB_ImBufFromStereo3d().
void IMB_stereo3d_write_dimensions | ( | char | mode, |
bool | is_squeezed, | ||
size_t | width, | ||
size_t | height, | ||
size_t * | r_width, | ||
size_t * | r_height | ||
) |
Definition at line 507 of file stereoimbuf.c.
References height, S3D_DISPLAY_ANAGLYPH, S3D_DISPLAY_INTERLACE, S3D_DISPLAY_SIDEBYSIDE, S3D_DISPLAY_TOPBOTTOM, and width.
Referenced by BKE_scene_multiview_videos_dimensions_get(), IMB_ImBufFromStereo3d(), IMB_stereo3d_from_rect(), IMB_stereo3d_from_rectf(), IMB_stereo3d_ImBuf(), imb_stereo3d_squeeze_rect(), and imb_stereo3d_squeeze_rectf().
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().
struct ImBuf* IMB_testiffname | ( | const char * | filepath, |
int | flags | ||
) |
Definition at line 294 of file readimage.c.
References BLI_assert, BLI_open(), BLI_path_is_rel(), BLI_strncpy(), ImBuf::cachename, file, ImBuf::flags, IB_multilayer, IB_test, IM_MAX_SPACE, imb_cache_filename(), IMB_FILENAME_SIZE, IMB_loadifffile(), ImBuf::name, NULL, and O_BINARY.
Referenced by detect_clip_source().
struct ImBuf* IMB_thumb_load_image | ( | const char * | filepath, |
const size_t | max_thumb_size, | ||
char | colorspace[IM_MAX_SPACE] | ||
) |
Definition at line 239 of file readimage.c.
References BLI_file_size(), BLI_strncpy(), ImBuf::flags, height, IB_metadata, IB_rect, IM_MAX_SPACE, IMB_file_type_from_ftype(), imb_handle_alpha(), IMB_ispic_type(), IMB_loadiffname(), IMB_metadata_ensure(), IMB_metadata_set_field(), ImBuf::metadata, NULL, SNPRINTF, THUMB_SIZE_MAX, type, width, ImBuf::x, and ImBuf::y.
Referenced by thumb_create_ex().
void IMB_tile_cache_params | ( | int | totthread, |
int | maxmem | ||
) |
Definition at line 236 of file cache.c.
References Freestyle::a, BLI_ghash_new(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_memarena_use_calloc(), BLI_mutex_init(), GLOBAL_CACHE, imb_global_tile_cmp(), imb_global_tile_hash(), imb_thread_cache_init(), imb_tile_cache_exit(), ImGlobalTileCache::maxmem, ImGlobalTileCache::memarena, ImGlobalTileCache::mutex, ImGlobalTileCache::thread_cache, ImGlobalTileCache::tilehash, and ImGlobalTileCache::totthread.
Referenced by imb_tile_cache_init().
Definition at line 426 of file cache.c.
References Freestyle::a, BLI_mutex_lock(), BLI_mutex_unlock(), ImBuf::flags, from, GLOBAL_CACHE, IB_rect, IMB_getmipmap(), imb_global_cache_get_tile(), ImBuf::mall, MEM_callocN, ImBuf::miptot, ImGlobalTileCache::mutex, NULL, ImBuf::rect, ImGlobalTile::refcount, ImBuf::tiles, ImBuf::tilex, ImBuf::tiley, w(), ImBuf::x, ImBuf::xtiles, y, ImBuf::y, and ImBuf::ytiles.
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().
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.
src | Image buffer to read from. |
dst | Image buffer to write to. rect or rect_float must already be initialized.
|
mode | Cropping/Wrap repeat effect to apply during transformation. |
filter | Interpolation to use during sampling. |
transform_matrix | Transformation matrix to use. The given matrix should transform between dst pixel space to src pixel space. One unit is one pixel. |
src_crop | Cropping 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().
Definition at line 724 of file filter.c.
References ImBuf::channels, IMB_unpremultiply_rect(), IMB_unpremultiply_rect_float(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by imb_handle_alpha().
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().
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().
int ismovie | ( | const char * | filepath | ) |
Referenced by imb_get_anim_type().
void nearest_interpolation | ( | const struct ImBuf * | in, |
struct ImBuf * | out, | ||
float | u, | ||
float | v, | ||
int | xout, | ||
int | yout | ||
) |
Referenced by BKE_tracking_stabilize_frame(), and transform_image().
void nearest_interpolation_color | ( | const struct ImBuf * | in, |
unsigned char | outI[4], | ||
float | outF[4], | ||
float | u, | ||
float | v | ||
) |
Definition at line 278 of file imageprocess.c.
References nearest_interpolation_color_char(), nearest_interpolation_color_fl(), and v.
Referenced by blender::compositor::MovieClipBaseOperation::execute_pixel_sampled(), blender::compositor::MultilayerColorOperation::execute_pixel_sampled(), IMB_sampleImageAtLocation(), nearest_interpolation(), blender::compositor::sample_image_at_location(), and studiolight_matcap_preview().
void nearest_interpolation_color_fl | ( | 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 | ||
) |
Definition at line 289 of file imageprocess.c.
References blender::math::floor(), ImBuf::rect, ImBuf::rect_float, v, x, ImBuf::x, y, and ImBuf::y.
Referenced by paint_sample_color(), and studiolight_calculate_radiance().