Blender V5.3
BKE_image.hh File Reference
#include "DNA_listBase.h"
#include "BLI_compiler_attrs.hh"
#include "BLI_function_ref.hh"
#include "BLI_mutex.hh"
#include "BLI_string_ref.hh"
#include "IMB_imbuf_enums.h"
#include <cstdint>
#include <limits>
#include <optional>

Go to the source code of this file.

Classes

struct  blender::bke::ImageRuntime

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::gpu
namespace  blender::ocio
namespace  blender::bke

Macros

#define IMA_MAX_SPACE   64
#define IMA_UDIM_MAX   2000
#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

Typedefs

typedef void blender::StampCallback(void *data, const char *propname, char *propvalue, int propvalue_maxncpy)

Enumerations

enum  blender::eUDIM_TILE_FORMAT { blender::UDIM_TILE_FORMAT_NONE = 0 , blender::UDIM_TILE_FORMAT_UDIM = 1 , blender::UDIM_TILE_FORMAT_UVTILE = 2 }

Functions

void blender::BKE_image_texture_cache_filepaths_foreach (const char *source_filepath_abs, const char *cache_dir, blender::FunctionRef< void(blender::StringRef cache_filepath)> callback)
void blender::BKE_image_buf_fill_color (unsigned char *rect, float *rect_float, int width, int height, const float color[4])
void blender::BKE_image_buf_fill_checker (unsigned char *rect, float *rect_float, int width, int height)
void blender::BKE_image_buf_fill_checker_color (unsigned char *rect, float *rect_float, int width, int height)
Allocate & Free, Data Managing
void blender::BKE_image_clear_autosave (Image *image)
void blender::BKE_image_free_packedfiles (Image *image)
void blender::BKE_image_free_views (Image *image)
void blender::BKE_image_free_buffers (Image *image)
void blender::BKE_image_free_buffers_ex (Image *image, bool do_lock)
void blender::BKE_image_free_data (Image *image)
char blender::BKE_image_alpha_mode_from_extension_ex (const char *filepath)
void blender::BKE_image_alpha_mode_from_extension (Image *image)
Image * blender::BKE_image_load (Main *bmain, const char *filepath, bool check_open=true)
Image * blender::BKE_image_load_in_lib (Main *bmain, std::optional< Library * > owner_library, const char *filepath, bool check_open=true)
Image * blender::BKE_image_load_exists (Main *bmain, const char *filepath, bool check_open=true, bool *r_exists=nullptr)
Image * blender::BKE_image_load_exists_in_lib (Main *bmain, std::optional< Library * > owner_library, const char *filepath, bool check_open=true, bool *r_exists=nullptr)
Image * blender::BKE_image_add_generated (Main *bmain, unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short gen_type, const float color[4], bool stereo3d, bool is_data, bool tiled)
Image * blender::BKE_image_add_from_imbuf (Main *bmain, ImBuf *ibuf, const char *name)
void blender::BKE_image_replace_imbuf (Image *image, ImBuf *ibuf)
void blender::BKE_image_free_all_textures (Main *bmain)
void blender::BKE_image_all_free_anim_ibufs (Main *bmain, int except_frame)
void blender::BKE_image_free_old_buffers (Main *bmain)
bool blender::BKE_image_memorypack (Image *ima)
void blender::BKE_image_packfiles (ReportList *reports, Image *ima, const char *basepath)
void blender::BKE_image_packfiles_from_mem (ReportList *reports, Image *ima, char *data, size_t data_len)
void blender::BKE_image_packfile_ensure (Main *bmain, Image *image, ReportList *reports, const char *data, int data_len)
bool blender::BKE_image_autosave_memorypack (Image *ima)
void blender::BKE_image_print_memlist (Main *bmain)
void blender::BKE_image_merge (Main *bmain, Image *dest, Image *source)
bool blender::BKE_image_scale (Image *image, int width, int height, ImageUser *iuser)
ImageTile * blender::BKE_image_get_tile (Image *ima, int tile_number)
ImageTile * blender::BKE_image_get_tile_from_iuser (Image *ima, const ImageUser *iuser)
int blender::BKE_image_get_tile_from_pos (Image *ima, const float uv[2], float r_uv[2], float r_ofs[2])
void blender::BKE_image_get_tile_uv (const Image *ima, const int tile_number, float r_uv[2])
int blender::BKE_image_find_nearest_tile_with_offset (const Image *image, const float co[2], float r_uv_offset[2]) ATTR_NONNULL(2
int int blender::BKE_image_find_nearest_tile (const Image *image, const float co[2]) ATTR_NONNULL(2) ATTR_WARN_UNUSED_RESULT
Read and Write
void blender::BKE_render_result_stamp_info (Scene *scene, Object *camera, RenderResult *rr, bool allocate_only)
StampData * blender::BKE_stamp_info_from_scene_static (const Scene *scene)
bool blender::BKE_stamp_is_known_field (const char *field_name)
void blender::BKE_imbuf_stamp_info (const RenderResult *rr, ImBuf *ibuf)
void blender::BKE_stamp_info_from_imbuf (RenderResult *rr, ImBuf *ibuf)
void blender::BKE_stamp_info_callback (void *data, StampData *stamp_data, StampCallback callback, bool noskip)
void blender::BKE_image_multilayer_stamp_info_callback (void *data, const Image &image, StampCallback callback, bool noskip)
void blender::BKE_render_result_stamp_data (RenderResult *rr, const char *key, const char *value)
StampData * blender::BKE_stamp_data_copy (const StampData *stamp_data)
void blender::BKE_stamp_data_free (StampData *stamp_data)
void blender::BKE_image_stamp_buf (Scene *scene, Object *camera, const StampData *stamp_data_template, ImBuf *ibuf)
bool blender::BKE_imbuf_alpha_test (ImBuf *ibuf)
bool blender::BKE_imbuf_write_stamp (const Scene *scene, const RenderResult *rr, ImBuf *ibuf, const char *filepath, const ImageFormatData *imf)
bool blender::BKE_imbuf_write (ImBuf *ibuf, const char *filepath, const ImageFormatData *imf)
bool blender::BKE_imbuf_write_as (ImBuf *ibuf, const char *filepath, const ImageFormatData *imf, bool save_copy)
MovieReader * blender::openanim (const char *filepath, ImBufFlags ibuf_flags, int streamindex, bool keep_original_colorspace, ColorManagedColorspaceSettings *colorspace_settings)
MovieReader * blender::openanim_noload (const char *filepath, ImBufFlags flags, int streamindex, bool keep_original_colorspace, ColorManagedColorspaceSettings *colorspace_settings)
Multiview Load OpenEXR
bool blender::BKE_image_has_ibuf (Image *ima, ImageUser *iuser)
ImBuf * blender::BKE_image_acquire_ibuf (Image *ima, ImageUser *iuser, void **r_lock)
ImBuf * blender::BKE_image_acquire_ibuf_gpu (Image *ima, ImageUser *iuser, void **r_lock, bool *r_load_failed=nullptr, bool cached_only=false)
ImBuf * blender::BKE_image_acquire_multilayer_view_ibuf (const RenderData &render_data, Image &image, const ImageUser &image_user, const char *pass_name, const char *view_name)
void blender::BKE_image_release_ibuf (Image *ima, ImBuf *ibuf, void *lock)
ImBuf * blender::BKE_image_preview (Image *ima, short max_size, short *r_width, short *r_height)
void blender::BKE_image_populate_cache_from_autosave (Image *ima)
Pool for Image Buffers
ImagePool * blender::BKE_image_pool_new ()
void blender::BKE_image_pool_free (ImagePool *pool)
ImBuf * blender::BKE_image_pool_acquire_ibuf (Image *ima, ImageUser *iuser, ImagePool *pool)
void blender::BKE_image_pool_release_ibuf (Image *ima, ImBuf *ibuf, ImagePool *pool)
void blender::BKE_image_user_frame_calc (Image *ima, ImageUser *iuser, int cfra)
int blender::BKE_image_user_frame_get (const ImageUser *iuser, int cfra, bool *r_is_in_range)
bool blender::BKE_image_user_match (const ImageUser &a, const ImageUser &b)
void blender::BKE_image_user_file_path (const ImageUser *iuser, const Image *ima, char *filepath)
void blender::BKE_image_user_file_path_ex (const Main *bmain, const ImageUser *iuser, const Image *ima, char *filepath, const bool resolve_udim, const bool resolve_multiview)
void blender::BKE_image_editors_update_frame (const Main *bmain, int cfra)
bool blender::BKE_image_user_id_has_animation (ID *id)
void blender::BKE_image_user_id_eval_animation (Depsgraph *depsgraph, ID *id)
bool blender::BKE_image_has_alpha (Image *image)
void blender::BKE_image_get_size (Image *image, ImageUser *iuser, int *r_width, int *r_height)
void blender::BKE_image_get_size_fl (Image *image, ImageUser *iuser, float r_size[2])
void blender::BKE_image_get_aspect (Image *image, float *r_aspx, float *r_aspy)
unsigned char * blender::BKE_image_get_pixels_for_frame (Image *image, int frame, int tile)
float * blender::BKE_image_get_float_pixels_for_frame (Image *image, int frame, int tile)
bool blender::BKE_image_is_dirty (Image *image)
bool blender::BKE_image_buffer_format_writable (ImBuf *ibuf)
bool blender::BKE_image_is_dirty_writable (Image *image, bool *r_is_writable)
int blender::BKE_image_sequence_guess_offset (Image *image)
bool blender::BKE_image_has_anim (Image *image)
bool blender::BKE_image_has_packedfile (const Image *image)
bool blender::BKE_image_has_filepath (const Image *ima)
bool blender::BKE_image_source_is_file (const Image *ima)
bool blender::BKE_image_is_animated (Image *image)
bool blender::BKE_image_has_multiple_ibufs (Image *image)
void blender::BKE_image_file_format_set (Image *image, eImbFileType ftype, const ImbFormatOptions *options)
bool blender::BKE_image_has_loaded_ibuf (Image *image)
ImBuf * blender::BKE_image_get_ibuf_with_name (Image *image, const char *filepath)
ImBuf * blender::BKE_image_get_first_ibuf (Image *image)
New Image API
void blender::BKE_imageuser_default (ImageUser *iuser)
void blender::BKE_image_init_imageuser (Image *ima, ImageUser *iuser)
void blender::BKE_image_signal (Main *bmain, Image *ima, ImageUser *iuser, int signal)
void blender::BKE_image_walk_all_users (const Main *mainp, void *customdata, void callback(Image *ima, ID *iuser_id, ImageUser *iuser, void *customdata))
Image * blender::BKE_image_ensure_viewer (Main *bmain, int type, const char *name)
void blender::BKE_image_ensure_viewer_views (const RenderData *rd, Image *ima, ImageUser *iuser)
RenderPass * blender::BKE_image_multilayer_index (RenderResult *rr, ImageUser *iuser)
void blender::BKE_image_multiview_index (const Image *ima, ImageUser *iuser)
bool blender::BKE_image_is_multilayer (const Image *ima)
bool blender::BKE_image_is_multiview (const Image *ima)
bool blender::BKE_image_is_stereo (const Image *ima)
RenderResult * blender::BKE_image_acquire_renderresult (Scene *scene, Image *ima)
void blender::BKE_image_release_renderresult (Scene *scene, Image *ima, RenderResult *render_result)
bool blender::BKE_image_is_openexr (Image *ima)
void blender::BKE_image_backup_render (Scene *scene, Image *ima, bool free_current_slot)
int blender::BKE_image_get_tile_label (const Image *ima, const ImageTile *tile, char *label, int label_maxncpy)
bool blender::BKE_image_get_tile_info (char *filepath, ListBaseT< LinkData > *tiles, int *r_tile_start, int *r_tile_range)
ImageTile * blender::BKE_image_add_tile (Image *ima, int tile_number, const char *label)
bool blender::BKE_image_remove_tile (Image *ima, ImageTile *tile)
void blender::BKE_image_reassign_tile (Image *ima, ImageTile *tile, int new_tile_number)
void blender::BKE_image_sort_tiles (Image *ima)
bool blender::BKE_image_fill_tile (Image *ima, ImageTile *tile)
bool blender::BKE_image_is_filename_tokenized (char *filepath)
void blender::BKE_image_ensure_tile_token (char *filepath, size_t filepath_maxncpy)
void blender::BKE_image_ensure_tile_token_filename_only (char *filename, size_t filename_maxncpy)
bool blender::BKE_image_tile_filepath_exists (const char *filepath)
char * blender::BKE_image_get_tile_strformat (const char *filepath, eUDIM_TILE_FORMAT *r_tile_format)
bool blender::BKE_image_get_tile_number_from_filepath (const char *filepath, const char *pattern, eUDIM_TILE_FORMAT tile_format, int *r_tile_number)
void blender::BKE_image_set_filepath_from_tile_number (char *filepath, const char *pattern, eUDIM_TILE_FORMAT tile_format, int tile_number)
Render Slots
RenderSlot * blender::BKE_image_add_renderslot (Image *ima, const char *name)
bool blender::BKE_image_remove_renderslot (Image *ima, ImageUser *iuser, int slot)
RenderSlot * blender::BKE_image_get_renderslot (Image *ima, int index)
bool blender::BKE_image_clear_renderslot (Image *ima, ImageUser *iuser, int slot)

Macro Definition Documentation

◆ IMA_MAX_SPACE

#define IMA_MAX_SPACE   64

Definition at line 55 of file BKE_image.hh.

◆ IMA_SIGNAL_COLORMANAGE

#define IMA_SIGNAL_COLORMANAGE   7

◆ IMA_SIGNAL_FREE

◆ IMA_SIGNAL_RELOAD

◆ IMA_SIGNAL_SRC_CHANGE

#define IMA_SIGNAL_SRC_CHANGE   5

Definition at line 181 of file BKE_image.hh.

Referenced by blender::BKE_image_signal(), and blender::image_replace_exec().

◆ IMA_SIGNAL_USER_NEW_IMAGE

◆ IMA_UDIM_MAX