Blender  V2.93
Macros | Typedefs | Functions
BKE_image.h File Reference
#include "BLI_utildefines.h"

Go to the source code of this file.

Macros

#define IMA_MAX_SPACE   64
 
#define IMA_UDIM_MAX   1999
 
#define IMA_OK   1
 
#define IMA_OK_LOADED   2
 
#define IMA_SIGNAL_RELOAD   0
 
#define IMA_SIGNAL_FREE   1
 
#define IMA_SIGNAL_SRC_CHANGE   5
 
#define IMA_SIGNAL_USER_NEW_IMAGE   6
 
#define IMA_SIGNAL_COLORMANAGE   7
 
#define IMA_CHAN_FLAG_BW   1
 
#define IMA_CHAN_FLAG_RGB   2
 
#define IMA_CHAN_FLAG_ALPHA   4
 

Typedefs

typedef void() StampCallback(void *data, const char *propname, char *propvalue, int len)
 

Functions

void BKE_images_init (void)
 
void BKE_images_exit (void)
 
void BKE_image_free_packedfiles (struct Image *image)
 
void BKE_image_free_views (struct Image *image)
 
void BKE_image_free_buffers (struct Image *image)
 
void BKE_image_free_buffers_ex (struct Image *image, bool do_lock)
 
void BKE_image_free_gputextures (struct Image *ima)
 
void BKE_image_free (struct Image *image)
 
void BKE_render_result_stamp_info (struct Scene *scene, struct Object *camera, struct RenderResult *rr, bool allocate_only)
 
struct StampDataBKE_stamp_info_from_scene_static (const struct Scene *scene)
 
bool BKE_stamp_is_known_field (const char *field_name)
 
void BKE_imbuf_stamp_info (struct RenderResult *rr, struct ImBuf *ibuf)
 
void BKE_stamp_info_from_imbuf (struct RenderResult *rr, struct ImBuf *ibuf)
 
void BKE_stamp_info_callback (void *data, struct StampData *stamp_data, StampCallback callback, bool noskip)
 
void BKE_render_result_stamp_data (struct RenderResult *rr, const char *key, const char *value)
 
struct StampDataBKE_stamp_data_copy (const struct StampData *stamp_data)
 
void BKE_stamp_data_free (struct StampData *stamp_data)
 
void BKE_image_stamp_buf (struct Scene *scene, struct Object *camera, const struct StampData *stamp_data_template, unsigned char *rect, float *rectf, int width, int height, int channels)
 
bool BKE_imbuf_alpha_test (struct ImBuf *ibuf)
 
int BKE_imbuf_write_stamp (struct Scene *scene, struct RenderResult *rr, struct ImBuf *ibuf, const char *name, const struct ImageFormatData *imf)
 
void BKE_imbuf_write_prepare (struct ImBuf *ibuf, const struct ImageFormatData *imf)
 
int BKE_imbuf_write (struct ImBuf *ibuf, const char *name, const struct ImageFormatData *imf)
 
int BKE_imbuf_write_as (struct ImBuf *ibuf, const char *name, struct ImageFormatData *imf, const bool save_copy)
 
void BKE_image_path_from_imformat (char *string, const char *base, const char *relbase, int frame, const struct ImageFormatData *im_format, const bool use_ext, const bool use_frames, const char *suffix)
 
void BKE_image_path_from_imtype (char *string, const char *base, const char *relbase, int frame, const char imtype, const bool use_ext, const bool use_frames, const char *suffix)
 
int BKE_image_path_ensure_ext_from_imformat (char *string, const struct ImageFormatData *im_format)
 
int BKE_image_path_ensure_ext_from_imtype (char *string, const char imtype)
 
char BKE_image_ftype_to_imtype (const int ftype, const struct ImbFormatOptions *options)
 
int BKE_image_imtype_to_ftype (const char imtype, struct ImbFormatOptions *r_options)
 
bool BKE_imtype_is_movie (const char imtype)
 
bool BKE_imtype_supports_zbuf (const char imtype)
 
bool BKE_imtype_supports_compress (const char imtype)
 
bool BKE_imtype_supports_quality (const char imtype)
 
bool BKE_imtype_requires_linear_float (const char imtype)
 
char BKE_imtype_valid_channels (const char imtype, bool write_file)
 
char BKE_imtype_valid_depths (const char imtype)
 
char BKE_imtype_from_arg (const char *arg)
 
void BKE_imformat_defaults (struct ImageFormatData *im_format)
 
void BKE_imbuf_to_image_format (struct ImageFormatData *im_format, const struct ImBuf *imbuf)
 
struct animopenanim (const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
 
struct animopenanim_noload (const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
 
void BKE_image_tag_time (struct Image *ima)
 
bool BKE_image_has_ibuf (struct Image *ima, struct ImageUser *iuser)
 
struct ImBufBKE_image_acquire_ibuf (struct Image *ima, struct ImageUser *iuser, void **r_lock)
 
void BKE_image_release_ibuf (struct Image *ima, struct ImBuf *ibuf, void *lock)
 
struct ImagePoolBKE_image_pool_new (void)
 
void BKE_image_pool_free (struct ImagePool *pool)
 
struct ImBufBKE_image_pool_acquire_ibuf (struct Image *ima, struct ImageUser *iuser, struct ImagePool *pool)
 
void BKE_image_pool_release_ibuf (struct Image *ima, struct ImBuf *ibuf, struct ImagePool *pool)
 
char BKE_image_alpha_mode_from_extension_ex (const char *filepath)
 
void BKE_image_alpha_mode_from_extension (struct Image *image)
 
struct ImageBKE_image_load (struct Main *bmain, const char *filepath)
 
struct ImageBKE_image_load_exists_ex (struct Main *bmain, const char *filepath, bool *r_exists)
 
struct ImageBKE_image_load_exists (struct Main *bmain, const char *filepath)
 
struct ImageBKE_image_add_generated (struct Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4], const bool stereo3d, const bool is_data, const bool tiled)
 
struct ImageBKE_image_add_from_imbuf (struct Main *bmain, struct ImBuf *ibuf, const char *name)
 
void BKE_imageuser_default (struct ImageUser *iuser)
 
void BKE_image_init_imageuser (struct Image *ima, struct ImageUser *iuser)
 
void BKE_image_signal (struct Main *bmain, struct Image *ima, struct ImageUser *iuser, int signal)
 
void BKE_image_walk_all_users (const struct Main *mainp, void *customdata, void callback(struct Image *ima, struct ID *iuser_id, struct ImageUser *iuser, void *customdata))
 
struct ImageBKE_image_ensure_viewer (struct Main *bmain, int type, const char *name)
 
void BKE_image_ensure_viewer_views (const struct RenderData *rd, struct Image *ima, struct ImageUser *iuser)
 
void BKE_image_user_frame_calc (struct Image *ima, struct ImageUser *iuser, int cfra)
 
int BKE_image_user_frame_get (const struct ImageUser *iuser, int cfra, bool *r_is_in_range)
 
void BKE_image_user_file_path (struct ImageUser *iuser, struct Image *ima, char *path)
 
void BKE_image_editors_update_frame (const struct Main *bmain, int cfra)
 
bool BKE_image_user_id_has_animation (struct ID *id)
 
void BKE_image_user_id_eval_animation (struct Depsgraph *depsgraph, struct ID *id)
 
struct RenderPassBKE_image_multilayer_index (struct RenderResult *rr, struct ImageUser *iuser)
 
void BKE_image_multiview_index (struct Image *ima, struct ImageUser *iuser)
 
bool BKE_image_is_multilayer (struct Image *ima)
 
bool BKE_image_is_multiview (struct Image *ima)
 
bool BKE_image_is_stereo (struct Image *ima)
 
struct RenderResultBKE_image_acquire_renderresult (struct Scene *scene, struct Image *ima)
 
void BKE_image_release_renderresult (struct Scene *scene, struct Image *ima)
 
bool BKE_image_is_openexr (struct Image *ima)
 
void BKE_image_backup_render (struct Scene *scene, struct Image *ima, bool free_current_slot)
 
bool BKE_image_save_openexr_multiview (struct Image *ima, struct ImBuf *ibuf, const char *filepath, const int flags)
 
void BKE_image_free_all_textures (struct Main *bmain)
 
void BKE_image_free_anim_ibufs (struct Image *ima, int except_frame)
 
void BKE_image_all_free_anim_ibufs (struct Main *bmain, int cfra)
 
void BKE_image_free_all_gputextures (struct Main *bmain)
 
void BKE_image_free_anim_gputextures (struct Main *bmain)
 
void BKE_image_free_old_gputextures (struct Main *bmain)
 
bool BKE_image_memorypack (struct Image *ima)
 
void BKE_image_packfiles (struct ReportList *reports, struct Image *ima, const char *basepath)
 
void BKE_image_packfiles_from_mem (struct ReportList *reports, struct Image *ima, char *data, const size_t data_len)
 
void BKE_image_print_memlist (struct Main *bmain)
 
void BKE_image_merge (struct Main *bmain, struct Image *dest, struct Image *source)
 
bool BKE_image_scale (struct Image *image, int width, int height)
 
bool BKE_image_has_alpha (struct Image *image)
 
bool BKE_image_has_opengl_texture (struct Image *ima)
 
void BKE_image_get_tile_label (struct Image *ima, struct ImageTile *tile, char *label, int len_label)
 
struct ImageTileBKE_image_add_tile (struct Image *ima, int tile_number, const char *label)
 
bool BKE_image_remove_tile (struct Image *ima, struct ImageTile *tile)
 
bool BKE_image_fill_tile (struct Image *ima, struct ImageTile *tile, int width, int height, const float color[4], int gen_type, int planes, bool is_float)
 
struct ImageTileBKE_image_get_tile (struct Image *ima, int tile_number)
 
struct ImageTileBKE_image_get_tile_from_iuser (struct Image *ima, const struct ImageUser *iuser)
 
int BKE_image_get_tile_from_pos (struct Image *ima, const float uv[2], float r_uv[2], float r_ofs[2])
 
int BKE_image_find_nearest_tile (const struct Image *image, const float co[2])
 
void BKE_image_get_size (struct Image *image, struct ImageUser *iuser, int *r_width, int *r_height)
 
void BKE_image_get_size_fl (struct Image *image, struct ImageUser *iuser, float r_size[2])
 
void BKE_image_get_aspect (struct Image *image, float *r_aspx, float *r_aspy)
 
void BKE_image_buf_fill_color (unsigned char *rect, float *rect_float, int width, int height, const float color[4])
 
void BKE_image_buf_fill_checker (unsigned char *rect, float *rect_float, int width, int height)
 
void BKE_image_buf_fill_checker_color (unsigned char *rect, float *rect_float, int width, int height)
 
unsigned char * BKE_image_get_pixels_for_frame (struct Image *image, int frame, int tile)
 
floatBKE_image_get_float_pixels_for_frame (struct Image *image, int frame, int tile)
 
bool BKE_image_is_dirty (struct Image *image)
 
void BKE_image_mark_dirty (struct Image *image, struct ImBuf *ibuf)
 
bool BKE_image_buffer_format_writable (struct ImBuf *ibuf)
 
bool BKE_image_is_dirty_writable (struct Image *image, bool *is_format_writable)
 
int BKE_image_sequence_guess_offset (struct Image *image)
 
bool BKE_image_has_anim (struct Image *image)
 
bool BKE_image_has_packedfile (struct Image *image)
 
bool BKE_image_has_filepath (struct Image *ima)
 
bool BKE_image_is_animated (struct Image *image)
 
bool BKE_image_has_multiple_ibufs (struct Image *image)
 
void BKE_image_file_format_set (struct Image *image, int ftype, const struct ImbFormatOptions *options)
 
bool BKE_image_has_loaded_ibuf (struct Image *image)
 
struct ImBufBKE_image_get_ibuf_with_name (struct Image *image, const char *name)
 
struct ImBufBKE_image_get_first_ibuf (struct Image *image)
 
struct GPUTextureBKE_image_create_gpu_texture_from_ibuf (struct Image *image, struct ImBuf *ibuf)
 
struct GPUTextureBKE_image_get_gpu_texture (struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
 
struct GPUTextureBKE_image_get_gpu_tiles (struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
 
struct GPUTextureBKE_image_get_gpu_tilemap (struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf)
 
bool BKE_image_has_gpu_texture_premultiplied_alpha (struct Image *image, struct ImBuf *ibuf)
 
void BKE_image_update_gputexture (struct Image *ima, struct ImageUser *iuser, int x, int y, int w, int h)
 
void BKE_image_update_gputexture_delayed (struct Image *ima, struct ImBuf *ibuf, int x, int y, int w, int h)
 
void BKE_image_paint_set_mipmap (struct Main *bmain, bool mipmap)
 
void BKE_image_free_unused_gpu_textures (void)
 
struct RenderSlotBKE_image_add_renderslot (struct Image *ima, const char *name)
 
bool BKE_image_remove_renderslot (struct Image *ima, struct ImageUser *iuser, int slot)
 
struct RenderSlotBKE_image_get_renderslot (struct Image *ima, int index)
 
bool BKE_image_clear_renderslot (struct Image *ima, struct ImageUser *iuser, int slot)
 

Macro Definition Documentation

◆ IMA_CHAN_FLAG_ALPHA

#define IMA_CHAN_FLAG_ALPHA   4

Definition at line 172 of file BKE_image.h.

◆ IMA_CHAN_FLAG_BW

#define IMA_CHAN_FLAG_BW   1

Definition at line 170 of file BKE_image.h.

◆ IMA_CHAN_FLAG_RGB

#define IMA_CHAN_FLAG_RGB   2

Definition at line 171 of file BKE_image.h.

◆ IMA_MAX_SPACE

#define IMA_MAX_SPACE   64

Definition at line 47 of file BKE_image.h.

◆ IMA_OK

#define IMA_OK   1

Definition at line 157 of file BKE_image.h.

◆ IMA_OK_LOADED

#define IMA_OK_LOADED   2

Definition at line 158 of file BKE_image.h.

◆ IMA_SIGNAL_COLORMANAGE

#define IMA_SIGNAL_COLORMANAGE   7

Definition at line 168 of file BKE_image.h.

◆ IMA_SIGNAL_FREE

#define IMA_SIGNAL_FREE   1

Definition at line 163 of file BKE_image.h.

◆ IMA_SIGNAL_RELOAD

#define IMA_SIGNAL_RELOAD   0

Definition at line 162 of file BKE_image.h.

◆ IMA_SIGNAL_SRC_CHANGE

#define IMA_SIGNAL_SRC_CHANGE   5

Definition at line 165 of file BKE_image.h.

◆ IMA_SIGNAL_USER_NEW_IMAGE

#define IMA_SIGNAL_USER_NEW_IMAGE   6

Definition at line 167 of file BKE_image.h.

◆ IMA_UDIM_MAX

#define IMA_UDIM_MAX   1999

Definition at line 48 of file BKE_image.h.

Typedef Documentation

◆ StampCallback

typedef void() StampCallback(void *data, const char *propname, char *propvalue, int len)

Definition at line 61 of file BKE_image.h.

Function Documentation

◆ BKE_image_acquire_ibuf()

struct ImBuf* BKE_image_acquire_ibuf ( struct Image ima,
struct ImageUser iuser,
void **  r_lock 
)

Definition at line 5100 of file image.c.

References BLI_mutex_lock(), BLI_mutex_unlock(), image_acquire_ibuf(), and image_mutex.

Referenced by backimage_fit_exec(), bake_images(), bake_object_check(), bake_targets_init_internal(), BKE_gpencil_from_image(), BKE_image_get_float_pixels_for_frame(), BKE_image_get_pixels_for_frame(), BKE_image_get_size(), BKE_image_has_alpha(), BKE_image_pool_acquire_ibuf(), BKE_image_scale(), BKE_image_update_gputexture(), clear_single_image(), cmp_node_image_create_outputs(), colorfn(), blender::compositor::ImageNode::convertToOperations(), cryptomatte_init_from_node_image(), do_multires_bake(), draw_nodespace_back_pix(), draw_plane_marker_image(), ED_space_image_acquire_buffer(), ED_space_node_color_sample(), ED_space_node_get_position(), eyedropper_cryptomatte_sample_image_fl(), finish_images(), blender::compositor::BaseImageOperation::getImBuf(), gpencil_boundaryfill_area(), gpencil_erase_processed_area(), gpencil_get_outline_points(), gpencil_image_texture_get(), gpencil_invert_image(), gpencil_set_borders(), gpu_texture_create_tile_array(), icon_preview_startjob(), IMAGE_cache_init(), image_camera_background_texture_get(), image_file_format_writable(), image_flip_exec(), image_from_context_has_data_poll(), image_get_gpu_texture(), image_has_alpha(), image_invert_exec(), image_rect_update(), image_save_options_init(), image_save_single(), image_scale_exec(), image_scale_invoke(), image_undosys_step_encode(), init_heights_data(), metadata_panel_context_draw(), multiresbake_check(), OVERLAY_edit_uv_cache_init(), paint_2d_bucket_fill(), paint_2d_canvas_set(), paint_2d_ensure_tile_canvas(), paint_2d_gradient_fill(), paint_2d_new_stroke(), paint_2d_redraw(), paint_sample_color(), palette_extract_img_exec(), project_paint_build_proj_ima(), project_paint_PickColor(), project_paint_uvpixel_init(), project_paint_uvpixel_mask(), ptile_restore_runtime_list(), RE_bake_ibuf_clear(), render_endjob(), sample_apply(), screen_opengl_render_apply(), snode_bg_viewmove_invoke(), texture_paint_camera_project_exec(), tile_fill_init(), trace_start_job(), uhandle_restore_list(), uiTemplateImage(), uiTemplateImageInfo(), viewer_border_exec(), WIDGETGROUP_node_corner_pin_refresh(), WIDGETGROUP_node_crop_refresh(), WIDGETGROUP_node_sbeam_refresh(), WIDGETGROUP_node_transform_refresh(), and write_internal_bake_pixels().

◆ BKE_image_acquire_renderresult()

struct RenderResult* BKE_image_acquire_renderresult ( struct Scene scene,
struct Image ima 
)

◆ BKE_image_add_from_imbuf()

struct Image* BKE_image_add_from_imbuf ( struct Main bmain,
struct ImBuf ibuf,
const char *  name 
)

◆ BKE_image_add_generated()

struct Image* BKE_image_add_generated ( struct Main bmain,
unsigned int  width,
unsigned int  height,
const char *  name,
int  depth,
int  floatbuf,
short  gen_type,
const float  color[4],
const bool  stereo3d,
const bool  is_data,
const bool  tiled 
)

◆ BKE_image_add_renderslot()

struct RenderSlot* BKE_image_add_renderslot ( struct Image ima,
const char *  name 
)

◆ BKE_image_add_tile()

struct ImageTile* BKE_image_add_tile ( struct Image ima,
int  tile_number,
const char *  label 
)

◆ BKE_image_all_free_anim_ibufs()

void BKE_image_all_free_anim_ibufs ( struct Main bmain,
int  cfra 
)

◆ BKE_image_alpha_mode_from_extension()

void BKE_image_alpha_mode_from_extension ( struct Image image)

◆ BKE_image_alpha_mode_from_extension_ex()

char BKE_image_alpha_mode_from_extension_ex ( const char *  filepath)

◆ BKE_image_backup_render()

void BKE_image_backup_render ( struct Scene scene,
struct Image ima,
bool  free_current_slot 
)

◆ BKE_image_buf_fill_checker()

void BKE_image_buf_fill_checker ( unsigned char *  rect,
float rect_float,
int  width,
int  height 
)

◆ BKE_image_buf_fill_checker_color()

void BKE_image_buf_fill_checker_color ( unsigned char *  rect,
float rect_float,
int  width,
int  height 
)

◆ BKE_image_buf_fill_color()

void BKE_image_buf_fill_color ( unsigned char *  rect,
float rect_float,
int  width,
int  height,
const float  color[4] 
)

◆ BKE_image_buffer_format_writable()

bool BKE_image_buffer_format_writable ( struct ImBuf ibuf)

◆ BKE_image_clear_renderslot()

bool BKE_image_clear_renderslot ( struct Image ima,
struct ImageUser iuser,
int  slot 
)

◆ BKE_image_create_gpu_texture_from_ibuf()

struct GPUTexture* BKE_image_create_gpu_texture_from_ibuf ( struct Image image,
struct ImBuf ibuf 
)

◆ BKE_image_editors_update_frame()

void BKE_image_editors_update_frame ( const struct Main bmain,
int  cfra 
)

◆ BKE_image_ensure_viewer()

struct Image* BKE_image_ensure_viewer ( struct Main bmain,
int  type,
const char *  name 
)

◆ BKE_image_ensure_viewer_views()

void BKE_image_ensure_viewer_views ( const struct RenderData rd,
struct Image ima,
struct ImageUser iuser 
)

◆ BKE_image_file_format_set()

void BKE_image_file_format_set ( struct Image image,
int  ftype,
const struct ImbFormatOptions options 
)

◆ BKE_image_fill_tile()

bool BKE_image_fill_tile ( struct Image ima,
struct ImageTile tile,
int  width,
int  height,
const float  color[4],
int  gen_type,
int  planes,
bool  is_float 
)

◆ BKE_image_find_nearest_tile()

int BKE_image_find_nearest_tile ( const struct Image image,
const float  co[2] 
)

Referenced by clipUVTransform().

◆ BKE_image_free()

void BKE_image_free ( Image ima)

Free (or release) any data used by this image (does not free the image itself).

Definition at line 521 of file image.c.

References Image::id, and image_free_data().

◆ BKE_image_free_all_gputextures()

void BKE_image_free_all_gputextures ( struct Main bmain)

◆ BKE_image_free_all_textures()

void BKE_image_free_all_textures ( struct Main bmain)

◆ BKE_image_free_anim_gputextures()

void BKE_image_free_anim_gputextures ( struct Main bmain)

◆ BKE_image_free_anim_ibufs()

void BKE_image_free_anim_ibufs ( struct Image ima,
int  except_frame 
)

◆ BKE_image_free_buffers()

void BKE_image_free_buffers ( struct Image image)

◆ BKE_image_free_buffers_ex()

void BKE_image_free_buffers_ex ( Image ima,
bool  do_lock 
)

Simply free the image data from memory, on display the image can load again (except for render buffers).

Definition at line 490 of file image.c.

References BKE_image_free_gputextures(), BLI_mutex_lock(), BLI_mutex_unlock(), IMA_OK, image_free_anims(), image_free_cached_frames(), image_mutex, LISTBASE_FOREACH, NULL, RE_FreeRenderResult(), Image::rr, and Image::tiles.

Referenced by BKE_image_free_buffers().

◆ BKE_image_free_gputextures()

void BKE_image_free_gputextures ( struct Image ima)

◆ BKE_image_free_old_gputextures()

void BKE_image_free_old_gputextures ( struct Main bmain)

◆ BKE_image_free_packedfiles()

void BKE_image_free_packedfiles ( struct Image image)

Definition at line 463 of file image.c.

References image_free_packedfiles().

Referenced by image_save_as_exec().

◆ BKE_image_free_unused_gpu_textures()

void BKE_image_free_unused_gpu_textures ( void  )

Definition at line 482 of file image_gpu.c.

References BLI_thread_is_main(), and gpu_free_unused_buffers().

Referenced by wm_draw_update(), and WM_exit_ex().

◆ BKE_image_free_views()

void BKE_image_free_views ( struct Image image)

◆ BKE_image_ftype_to_imtype()

char BKE_image_ftype_to_imtype ( const int  ftype,
const struct ImbFormatOptions options 
)

◆ BKE_image_get_aspect()

void BKE_image_get_aspect ( struct Image image,
float r_aspx,
float r_aspy 
)

◆ BKE_image_get_first_ibuf()

struct ImBuf* BKE_image_get_first_ibuf ( Image image)

References the result, BKE_image_release_ibuf is to be called to de-reference. Use lock=NULL when calling BKE_image_release_ibuf().

TODO(sergey): This is actually "get first item from the cache", which is not so much predictable. But using first loaded image buffer was also malicious logic and all the areas which uses this function are to be re-considered.

Definition at line 5772 of file image.c.

References BLI_mutex_lock(), BLI_mutex_unlock(), Image::cache, image_mutex, IMB_moviecacheIter_done(), IMB_moviecacheIter_free(), IMB_moviecacheIter_getImBuf(), IMB_moviecacheIter_new(), IMB_refImBuf(), and NULL.

◆ BKE_image_get_float_pixels_for_frame()

float* BKE_image_get_float_pixels_for_frame ( struct Image image,
int  frame,
int  tile 
)

◆ BKE_image_get_gpu_texture()

struct GPUTexture* BKE_image_get_gpu_texture ( struct Image image,
struct ImageUser iuser,
struct ImBuf ibuf 
)

◆ BKE_image_get_gpu_tilemap()

struct GPUTexture* BKE_image_get_gpu_tilemap ( struct Image image,
struct ImageUser iuser,
struct ImBuf ibuf 
)

◆ BKE_image_get_gpu_tiles()

struct GPUTexture* BKE_image_get_gpu_tiles ( struct Image image,
struct ImageUser iuser,
struct ImBuf ibuf 
)

◆ BKE_image_get_ibuf_with_name()

struct ImBuf* BKE_image_get_ibuf_with_name ( Image image,
const char *  name 
)

◆ BKE_image_get_pixels_for_frame()

unsigned char* BKE_image_get_pixels_for_frame ( struct Image image,
int  frame,
int  tile 
)

◆ BKE_image_get_renderslot()

struct RenderSlot* BKE_image_get_renderslot ( struct Image ima,
int  index 
)

◆ BKE_image_get_size()

void BKE_image_get_size ( struct Image image,
struct ImageUser iuser,
int *  r_width,
int *  r_height 
)

◆ BKE_image_get_size_fl()

void BKE_image_get_size_fl ( struct Image image,
struct ImageUser iuser,
float  r_size[2] 
)

◆ BKE_image_get_tile()

struct ImageTile* BKE_image_get_tile ( struct Image ima,
int  tile_number 
)

◆ BKE_image_get_tile_from_iuser()

struct ImageTile* BKE_image_get_tile_from_iuser ( struct Image ima,
const struct ImageUser iuser 
)

◆ BKE_image_get_tile_from_pos()

int BKE_image_get_tile_from_pos ( struct Image ima,
const float  uv[2],
float  r_uv[2],
float  r_ofs[2] 
)

◆ BKE_image_get_tile_label()

void BKE_image_get_tile_label ( struct Image ima,
struct ImageTile tile,
char *  label,
int  len_label 
)

Definition at line 3697 of file image.c.

References BLI_snprintf(), BLI_strncpy(), label, ImageTile::label, NULL, and ImageTile::tile_number.

Referenced by draw_image_main().

◆ BKE_image_has_alpha()

bool BKE_image_has_alpha ( struct Image image)

Definition at line 5485 of file image.c.

References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), NULL, and ImBuf::planes.

◆ BKE_image_has_anim()

bool BKE_image_has_anim ( struct Image image)

◆ BKE_image_has_filepath()

bool BKE_image_has_filepath ( struct Image ima)

Definition at line 5632 of file image.c.

References Image::filepath.

Referenced by image_save_invoke(), and uiTemplateImage().

◆ BKE_image_has_gpu_texture_premultiplied_alpha()

bool BKE_image_has_gpu_texture_premultiplied_alpha ( struct Image image,
struct ImBuf ibuf 
)

◆ BKE_image_has_ibuf()

bool BKE_image_has_ibuf ( struct Image ima,
struct ImageUser iuser 
)

◆ BKE_image_has_loaded_ibuf()

bool BKE_image_has_loaded_ibuf ( struct Image image)

◆ BKE_image_has_multiple_ibufs()

bool BKE_image_has_multiple_ibufs ( struct Image image)

◆ BKE_image_has_opengl_texture()

bool BKE_image_has_opengl_texture ( struct Image ima)

Definition at line 660 of file image.c.

References Image::gputexture, NULL, and TEXTARGET_COUNT.

Referenced by BKE_image_free_old_gputextures(), and BKE_image_paint_set_mipmap().

◆ BKE_image_has_packedfile()

bool BKE_image_has_packedfile ( struct Image image)

◆ BKE_image_imtype_to_ftype()

int BKE_image_imtype_to_ftype ( const char  imtype,
struct ImbFormatOptions r_options 
)

◆ BKE_image_init_imageuser()

void BKE_image_init_imageuser ( struct Image ima,
struct ImageUser iuser 
)

◆ BKE_image_is_animated()

bool BKE_image_is_animated ( struct Image image)

◆ BKE_image_is_dirty()

bool BKE_image_is_dirty ( struct Image image)

◆ BKE_image_is_dirty_writable()

bool BKE_image_is_dirty_writable ( struct Image image,
bool *  is_format_writable 
)

◆ BKE_image_is_multilayer()

bool BKE_image_is_multilayer ( struct Image ima)

◆ BKE_image_is_multiview()

bool BKE_image_is_multiview ( struct Image ima)

◆ BKE_image_is_openexr()

bool BKE_image_is_openexr ( struct Image ima)

◆ BKE_image_is_stereo()

bool BKE_image_is_stereo ( struct Image ima)

◆ BKE_image_load()

struct Image* BKE_image_load ( struct Main bmain,
const char *  filepath 
)

◆ BKE_image_load_exists()

struct Image* BKE_image_load_exists ( struct Main bmain,
const char *  filepath 
)

Definition at line 880 of file image.c.

References BKE_image_load_exists_ex(), and NULL.

Referenced by DocumentImporter::writeImage().

◆ BKE_image_load_exists_ex()

struct Image* BKE_image_load_exists_ex ( struct Main bmain,
const char *  filepath,
bool *  r_exists 
)

◆ BKE_image_mark_dirty()

void BKE_image_mark_dirty ( struct Image image,
struct ImBuf ibuf 
)

◆ BKE_image_memorypack()

bool BKE_image_memorypack ( struct Image ima)

◆ BKE_image_merge()

void BKE_image_merge ( struct Main bmain,
struct Image dest,
struct Image source 
)

◆ BKE_image_multilayer_index()

struct RenderPass* BKE_image_multilayer_index ( struct RenderResult rr,
struct ImageUser iuser 
)

◆ BKE_image_multiview_index()

void BKE_image_multiview_index ( struct Image ima,
struct ImageUser iuser 
)

◆ BKE_image_packfiles()

void BKE_image_packfiles ( struct ReportList reports,
struct Image ima,
const char *  basepath 
)

◆ BKE_image_packfiles_from_mem()

void BKE_image_packfiles_from_mem ( struct ReportList reports,
struct Image ima,
char *  data,
const size_t  data_len 
)

◆ BKE_image_paint_set_mipmap()

void BKE_image_paint_set_mipmap ( struct Main bmain,
bool  mipmap 
)

◆ BKE_image_path_ensure_ext_from_imformat()

int BKE_image_path_ensure_ext_from_imformat ( char *  string,
const struct ImageFormatData im_format 
)

◆ BKE_image_path_ensure_ext_from_imtype()

int BKE_image_path_ensure_ext_from_imtype ( char *  string,
const char  imtype 
)

Definition at line 1780 of file image.c.

References do_add_image_extension(), and NULL.

Referenced by dynamicPaint_outputSurfaceImage(), and unpack_generate_paths().

◆ BKE_image_path_from_imformat()

void BKE_image_path_from_imformat ( char *  string,
const char *  base,
const char *  relbase,
int  frame,
const struct ImageFormatData im_format,
const bool  use_ext,
const bool  use_frames,
const char *  suffix 
)

◆ BKE_image_path_from_imtype()

void BKE_image_path_from_imtype ( char *  string,
const char *  base,
const char *  relbase,
int  frame,
const char  imtype,
const bool  use_ext,
const bool  use_frames,
const char *  suffix 
)

◆ BKE_image_pool_acquire_ibuf()

struct ImBuf* BKE_image_pool_acquire_ibuf ( struct Image ima,
struct ImageUser iuser,
struct ImagePool pool 
)

◆ BKE_image_pool_free()

void BKE_image_pool_free ( struct ImagePool pool)

◆ BKE_image_pool_new()

struct ImagePool* BKE_image_pool_new ( void  )

◆ BKE_image_pool_release_ibuf()

void BKE_image_pool_release_ibuf ( struct Image ima,
struct ImBuf ibuf,
struct ImagePool pool 
)

◆ BKE_image_print_memlist()

void BKE_image_print_memlist ( struct Main bmain)

Definition at line 1235 of file image.c.

References ListBase::first, Image::id, image_mem_size(), Main::images, ID::name, ID::next, and size().

◆ BKE_image_release_ibuf()

void BKE_image_release_ibuf ( struct Image ima,
struct ImBuf ibuf,
void *  lock 
)

Definition at line 5113 of file image.c.

References BLI_mutex_lock(), BLI_mutex_unlock(), BLI_thread_unlock(), image_mutex, IMB_freeImBuf(), LOCK_VIEWER, NULL, and RE_ReleaseResultImage().

Referenced by backimage_fit_exec(), bake_images(), bake_object_check(), bake_targets_init_internal(), BKE_gpencil_from_image(), BKE_image_fill_tile(), BKE_image_get_float_pixels_for_frame(), BKE_image_get_pixels_for_frame(), BKE_image_get_size(), BKE_image_has_alpha(), BKE_image_pool_release_ibuf(), BKE_image_scale(), BKE_image_update_gputexture(), clear_single_image(), cmp_node_image_create_outputs(), colorfn(), blender::compositor::ImageNode::convertToOperations(), cryptomatte_init_from_node_image(), blender::compositor::BaseImageOperation::deinitExecution(), blender::compositor::BaseImageOperation::determineResolution(), do_multires_bake(), draw_nodespace_back_pix(), draw_plane_marker_image(), ED_space_image_acquire_buffer(), ED_space_image_release_buffer(), ED_space_node_color_sample(), ED_space_node_get_position(), eyedropper_cryptomatte_sample_image_fl(), finish_images(), blender::compositor::BaseImageOperation::getImBuf(), gpencil_boundaryfill_area(), gpencil_erase_processed_area(), gpencil_get_outline_points(), gpencil_image_texture_get(), gpencil_invert_image(), gpencil_render_offscreen(), gpencil_set_borders(), gpu_texture_create_tile_array(), icon_preview_startjob(), image_camera_background_texture_get(), image_draw_finish(), image_file_format_writable(), image_flip_exec(), image_from_context_has_data_poll(), image_get_gpu_texture(), image_has_alpha(), image_invert_exec(), image_rect_update(), image_save_options_init(), image_save_single(), image_scale_exec(), image_scale_invoke(), image_undosys_step_encode(), init_heights_data(), metadata_panel_context_draw(), multiresbake_check(), OVERLAY_edit_uv_draw_finish(), paint_2d_bucket_fill(), paint_2d_canvas_free(), paint_2d_canvas_set(), paint_2d_ensure_tile_canvas(), paint_2d_gradient_fill(), paint_2d_new_stroke(), paint_2d_redraw(), paint_sample_color(), palette_extract_img_exec(), project_paint_end(), project_paint_PickColor(), project_paint_uvpixel_init(), project_paint_uvpixel_mask(), ptile_restore_runtime_list(), RE_bake_ibuf_clear(), render_endjob(), sample_apply(), screen_opengl_render_apply(), snode_bg_viewmove_invoke(), tile_fill_init(), trace_start_job(), uhandle_restore_list(), uiTemplateImage(), uiTemplateImageInfo(), viewer_border_exec(), WIDGETGROUP_node_corner_pin_refresh(), WIDGETGROUP_node_crop_refresh(), WIDGETGROUP_node_sbeam_refresh(), WIDGETGROUP_node_transform_refresh(), and write_internal_bake_pixels().

◆ BKE_image_release_renderresult()

void BKE_image_release_renderresult ( struct Scene scene,
struct Image ima 
)

◆ BKE_image_remove_renderslot()

bool BKE_image_remove_renderslot ( struct Image ima,
struct ImageUser iuser,
int  slot 
)

◆ BKE_image_remove_tile()

bool BKE_image_remove_tile ( struct Image ima,
struct ImageTile tile 
)

◆ BKE_image_save_openexr_multiview()

bool BKE_image_save_openexr_multiview ( struct Image ima,
struct ImBuf ibuf,
const char *  filepath,
const int  flags 
)

◆ BKE_image_scale()

bool BKE_image_scale ( struct Image image,
int  width,
int  height 
)

◆ BKE_image_sequence_guess_offset()

int BKE_image_sequence_guess_offset ( struct Image image)

Definition at line 5617 of file image.c.

References BLI_path_sequence_decode(), Image::filepath, and NULL.

Referenced by cmp_node_image_create_outputs().

◆ BKE_image_signal()

void BKE_image_signal ( struct Main bmain,
struct Image ima,
struct ImageUser iuser,
int  signal 
)

Definition at line 3499 of file image.c.

References BKE_image_free_buffers(), BKE_image_get_tile(), BKE_image_has_packedfile(), BKE_image_init_imageuser(), BKE_image_packfiles(), BKE_image_walk_all_users(), BKE_packedfile_free(), BKE_packedfile_new(), BLI_assert, BLI_listbase_count_at_most(), BLI_mutex_lock(), BLI_mutex_unlock(), ELEM, ImagePackedFile::filepath, Image::filepath, ListBase::first, Image::gen_x, Image::gen_y, Image::id, Scene::id, ID_BLEND_PATH, IMA_NO_INDEX, IMA_SIGNAL_COLORMANAGE, IMA_SIGNAL_FREE, IMA_SIGNAL_RELOAD, IMA_SIGNAL_SRC_CHANGE, IMA_SIGNAL_USER_NEW_IMAGE, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_SRC_SEQUENCE, IMA_SRC_TILED, IMA_TYPE_IMAGE, IMA_TYPE_MULTILAYER, IMA_TYPE_UV_TEST, image_free_packedfiles(), image_free_tile(), image_get_cached_ibuf_for_index_entry(), image_mutex, image_num_files(), image_tag_frame_recalc(), image_tag_reload(), image_update_views_format(), IMB_freeImBuf(), ListBase::last, LISTBASE_FOREACH, MEM_freeN, ID::next, ImagePackedFile::next, ImageTile::next, Scene::nodetree, nodeUpdateID(), NULL, ImageUser::ok, ImagePackedFile::packedfile, Image::packedfiles, pf, scene, ImageUser::scene, Main::scenes, Image::source, Image::tiles, Image::type, ImBuf::x, and ImBuf::y.

Referenced by BKE_bpath_traverse_id(), BKE_image_save(), BKE_packedfile_unpack_image(), blender::compositor::CompositorOperation::deinitExecution(), ED_space_image_auto_set(), ED_space_image_set(), image_new_exec(), image_open_exec(), image_reload_exec(), image_replace_exec(), node_add_file_exec(), proj_paint_add_slot(), screen_opengl_render_init(), screen_render_exec(), and screen_render_invoke().

◆ BKE_image_stamp_buf()

void BKE_image_stamp_buf ( struct Scene scene,
struct Object camera,
const struct StampData stamp_data_template,
unsigned char *  rect,
float rectf,
int  width,
int  height,
int  channels 
)

◆ BKE_image_tag_time()

void BKE_image_tag_time ( struct Image ima)

◆ BKE_image_update_gputexture()

void BKE_image_update_gputexture ( struct Image ima,
struct ImageUser iuser,
int  x,
int  y,
int  w,
int  h 
)

◆ BKE_image_update_gputexture_delayed()

void BKE_image_update_gputexture_delayed ( struct Image ima,
struct ImBuf ibuf,
int  x,
int  y,
int  w,
int  h 
)

◆ BKE_image_user_file_path()

void BKE_image_user_file_path ( struct ImageUser iuser,
struct Image ima,
char *  path 
)

◆ BKE_image_user_frame_calc()

void BKE_image_user_frame_calc ( struct Image ima,
struct ImageUser iuser,
int  cfra 
)

◆ BKE_image_user_frame_get()

int BKE_image_user_frame_get ( const struct ImageUser iuser,
int  cfra,
bool *  r_is_in_range 
)

◆ BKE_image_user_id_eval_animation()

void BKE_image_user_id_eval_animation ( struct Depsgraph depsgraph,
struct ID id 
)

◆ BKE_image_user_id_has_animation()

bool BKE_image_user_id_has_animation ( struct ID id)

◆ BKE_image_walk_all_users()

void BKE_image_walk_all_users ( const struct Main mainp,
void *  customdata,
void   callbackstruct Image *ima, struct ID *iuser_id, struct ImageUser *iuser, void *customdata 
)

◆ BKE_images_exit()

void BKE_images_exit ( void  )

Definition at line 436 of file image.c.

References BLI_mutex_free(), and image_mutex.

Referenced by BKE_blender_free(), and wm_main_playanim_intern().

◆ BKE_images_init()

void BKE_images_init ( void  )

Definition at line 431 of file image.c.

References BLI_mutex_alloc(), and image_mutex.

Referenced by main(), and BlendfileLoadingBaseTest::SetUpTestCase().

◆ BKE_imageuser_default()

void BKE_imageuser_default ( struct ImageUser iuser)

◆ BKE_imbuf_alpha_test()

bool BKE_imbuf_alpha_test ( struct ImBuf ibuf)

Definition at line 2812 of file image.c.

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

Referenced by bake_ibuf_filter(), and image_save_single().

◆ BKE_imbuf_stamp_info()

void BKE_imbuf_stamp_info ( struct RenderResult rr,
struct ImBuf ibuf 
)

◆ BKE_imbuf_to_image_format()

void BKE_imbuf_to_image_format ( struct ImageFormatData im_format,
const struct ImBuf imbuf 
)

Referenced by image_save_options_init().

◆ BKE_imbuf_write()

int BKE_imbuf_write ( struct ImBuf ibuf,
const char *  name,
const struct ImageFormatData imf 
)

◆ BKE_imbuf_write_as()

int BKE_imbuf_write_as ( struct ImBuf ibuf,
const char *  name,
struct ImageFormatData imf,
const bool  save_copy 
)

◆ BKE_imbuf_write_prepare()

void BKE_imbuf_write_prepare ( struct ImBuf ibuf,
const struct ImageFormatData imf 
)

Referenced by image_save_single().

◆ BKE_imbuf_write_stamp()

int BKE_imbuf_write_stamp ( struct Scene scene,
struct RenderResult rr,
struct ImBuf ibuf,
const char *  name,
const struct ImageFormatData imf 
)

◆ BKE_imformat_defaults()

void BKE_imformat_defaults ( struct ImageFormatData im_format)

◆ BKE_imtype_from_arg()

char BKE_imtype_from_arg ( const char *  arg)

◆ BKE_imtype_is_movie()

bool BKE_imtype_is_movie ( const char  imtype)

◆ BKE_imtype_requires_linear_float()

bool BKE_imtype_requires_linear_float ( const char  imtype)

◆ BKE_imtype_supports_compress()

bool BKE_imtype_supports_compress ( const char  imtype)

Definition at line 1467 of file image.c.

References R_IMF_IMTYPE_PNG.

Referenced by uiTemplateImageSettings().

◆ BKE_imtype_supports_quality()

bool BKE_imtype_supports_quality ( const char  imtype)

Definition at line 1476 of file image.c.

References R_IMF_IMTYPE_AVIJPEG, R_IMF_IMTYPE_JP2, and R_IMF_IMTYPE_JPEG90.

Referenced by uiTemplateImageSettings().

◆ BKE_imtype_supports_zbuf()

bool BKE_imtype_supports_zbuf ( const char  imtype)

Definition at line 1457 of file image.c.

References R_IMF_IMTYPE_IRIZ, and R_IMF_IMTYPE_OPENEXR.

Referenced by uiTemplateImageSettings().

◆ BKE_imtype_valid_channels()

char BKE_imtype_valid_channels ( const char  imtype,
bool  write_file 
)

◆ BKE_imtype_valid_depths()

char BKE_imtype_valid_depths ( const char  imtype)

◆ BKE_render_result_stamp_data()

void BKE_render_result_stamp_data ( struct RenderResult rr,
const char *  key,
const char *  value 
)

◆ BKE_render_result_stamp_info()

void BKE_render_result_stamp_info ( struct Scene scene,
struct Object camera,
struct RenderResult rr,
bool  allocate_only 
)

◆ BKE_stamp_data_copy()

struct StampData* BKE_stamp_data_copy ( const struct StampData stamp_data)

◆ BKE_stamp_data_free()

void BKE_stamp_data_free ( struct StampData stamp_data)

◆ BKE_stamp_info_callback()

void BKE_stamp_info_callback ( void *  data,
struct StampData stamp_data,
StampCallback  callback,
bool  noskip 
)

◆ BKE_stamp_info_from_imbuf()

void BKE_stamp_info_from_imbuf ( struct RenderResult rr,
struct ImBuf ibuf 
)

◆ BKE_stamp_info_from_scene_static()

struct StampData* BKE_stamp_info_from_scene_static ( const struct Scene scene)

Fills in the static stamp data (i.e. everything except things that can change per frame). The caller is responsible for freeing the allocated memory.

Referenced by blender::compositor::OutputOpenExrMultiLayerOperation::createStampData().

◆ BKE_stamp_is_known_field()

bool BKE_stamp_is_known_field ( const char *  field_name)

Definition at line 2674 of file image.c.

References NULL, stamp_metadata_fields, and STREQ.

Referenced by metadata_copy_custom_fields(), and metadata_is_custom_drawable().

◆ openanim()

struct anim* openanim ( const char *  name,
int  flags,
int  streamindex,
char  colorspace[IMA_MAX_SPACE] 
)

◆ openanim_noload()

struct anim* openanim_noload ( const char *  name,
int  flags,
int  streamindex,
char  colorspace[IMA_MAX_SPACE] 
)

Definition at line 3103 of file image.c.

References anim::colorspace, IMB_open_anim(), anim::name, and anim::streamindex.

Referenced by seq_open_anim_file().