Blender
V3.3
|
#include <cctype>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <ctime>
#include <fcntl.h>
#include <unistd.h>
#include <regex>
#include <string>
#include "BLI_array.hh"
#include "CLG_log.h"
#include "MEM_guardedalloc.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "IMB_metadata.h"
#include "IMB_moviecache.h"
#include "IMB_openexr.h"
#include "DNA_brush_types.h"
#include "DNA_camera_types.h"
#include "DNA_defaults.h"
#include "DNA_light_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_packedFile_types.h"
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
#include "DNA_simulation_types.h"
#include "DNA_world_types.h"
#include "BLI_blenlib.h"
#include "BLI_math_vector.h"
#include "BLI_mempool.h"
#include "BLI_system.h"
#include "BLI_task.h"
#include "BLI_threads.h"
#include "BLI_timecode.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_bpath.h"
#include "BKE_colortools.h"
#include "BKE_global.h"
#include "BKE_icons.h"
#include "BKE_idtype.h"
#include "BKE_image.h"
#include "BKE_image_format.h"
#include "BKE_lib_id.h"
#include "BKE_main.h"
#include "BKE_node.h"
#include "BKE_node_tree_update.h"
#include "BKE_packedFile.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_workspace.h"
#include "BLF_api.h"
#include "PIL_time.h"
#include "RE_pipeline.h"
#include "SEQ_utils.h"
#include "GPU_material.h"
#include "GPU_texture.h"
#include "BLI_sys_types.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "BLO_read_write.h"
#include "DNA_node_types.h"
#include "DNA_screen_types.h"
#include "DNA_space_types.h"
#include "DNA_view3d_types.h"
Go to the source code of this file.
Classes | |
struct | ImageCacheKey |
struct | ImageFillData |
struct | StampDataCustomField |
struct | StampData |
struct | ImagePoolItem |
struct | ImagePool |
Macros | |
#define | DNA_DEPRECATED_ALLOW |
#define | TEXT_SIZE_CHECK(str, w, h) ((str[0]) && ((void)(h = h_fixed), (w = (int)BLF_width(mono, str, sizeof(str))))) |
#define | TEXT_SIZE_CHECK_WORD_WRAP(str, w, h) |
#define | BUFF_MARGIN_X 2 |
#define | BUFF_MARGIN_Y 1 |
#define | CALL(member, value_str) |
Variables | |
static CLG_LogRef | LOG = {"bke.image"} |
Read and Write | |
#define | STAMP_NAME_SIZE ((MAX_ID_NAME - 2) + 16) |
static const char * | stamp_metadata_fields [] |
static void | stampdata (const Scene *scene, Object *camera, StampData *stamp_data, int do_prefix, bool use_dynamic) |
static void | stampdata_from_template (StampData *stamp_data, const Scene *scene, const StampData *stamp_data_template, bool do_prefix) |
void | BKE_image_stamp_buf (Scene *scene, Object *camera, const StampData *stamp_data_template, unsigned char *rect, float *rectf, int width, int height, int channels) |
void | BKE_render_result_stamp_info (Scene *scene, Object *camera, struct RenderResult *rr, bool allocate_only) |
struct StampData * | BKE_stamp_info_from_scene_static (const Scene *scene) |
bool | BKE_stamp_is_known_field (const char *field_name) |
void | BKE_stamp_info_callback (void *data, struct StampData *stamp_data, StampCallback callback, bool noskip) |
void | BKE_render_result_stamp_data (RenderResult *rr, const char *key, const char *value) |
StampData * | BKE_stamp_data_copy (const StampData *stamp_data) |
void | BKE_stamp_data_free (StampData *stamp_data) |
static void | metadata_set_field (void *data, const char *propname, char *propvalue, int UNUSED(len)) |
static void | metadata_get_field (void *data, const char *propname, char *propvalue, int len) |
void | BKE_imbuf_stamp_info (const RenderResult *rr, ImBuf *ibuf) |
static void | metadata_copy_custom_fields (const char *field, const char *value, void *rr_v) |
void | BKE_stamp_info_from_imbuf (RenderResult *rr, ImBuf *ibuf) |
bool | BKE_imbuf_alpha_test (ImBuf *ibuf) |
int | BKE_imbuf_write (ImBuf *ibuf, const char *name, const ImageFormatData *imf) |
int | BKE_imbuf_write_as (ImBuf *ibuf, const char *name, const ImageFormatData *imf, const bool save_copy) |
int | BKE_imbuf_write_stamp (const Scene *scene, const struct RenderResult *rr, ImBuf *ibuf, const char *name, const struct ImageFormatData *imf) |
struct anim * | openanim_noload (const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE]) |
struct anim * | openanim (const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE]) |
#define BUFF_MARGIN_X 2 |
#define BUFF_MARGIN_Y 1 |
#define CALL | ( | member, | |
value_str | |||
) |
#define DNA_DEPRECATED_ALLOW |
Definition at line 37 of file source/blender/blenkernel/intern/image.cc.
#define IMA_INDEX_ENTRY | ( | index | ) | ((index) >> 10) |
Definition at line 472 of file source/blender/blenkernel/intern/image.cc.
#define IMA_MAKE_INDEX | ( | entry, | |
index | |||
) | (((entry) << 10) + (index)) |
Definition at line 471 of file source/blender/blenkernel/intern/image.cc.
#define IMA_NO_INDEX 0x7FEFEFEF |
Definition at line 468 of file source/blender/blenkernel/intern/image.cc.
#define STAMP_NAME_SIZE ((MAX_ID_NAME - 2) + 16) |
Definition at line 1574 of file source/blender/blenkernel/intern/image.cc.
#define TEXT_SIZE_CHECK | ( | str, | |
w, | |||
h | |||
) | ((str[0]) && ((void)(h = h_fixed), (w = (int)BLF_width(mono, str, sizeof(str))))) |
|
static |
Definition at line 1051 of file source/blender/blenkernel/intern/image.cc.
References BLI_task_isolate(), color, COLOR_ROLE_DEFAULT_BYTE, COLOR_ROLE_DEFAULT_FLOAT, copy_v4_v4(), data, height, IB_rect, IB_rectfloat, image_buf_fill_isolated(), IMB_allocImBuf(), IMB_colormanagement_assign_rect_colorspace(), IMB_colormanagement_check_is_data(), IMB_colormanagement_role_colorspace_name_get(), IMB_colormanagement_space_name_is_data(), ColorManagedColorspaceSettings::name, ImBuf::name, ImBuf::rect, ImBuf::rect_float, srgb_to_linearrgb_v4(), STRNCPY, and width.
Referenced by BKE_image_add_generated(), BKE_image_fill_tile(), and image_acquire_ibuf().
Return image buffer for given image and user:
References the result, BKE_image_release_ibuf should be used to de-reference.
Definition at line 4668 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), Image_Runtime::cache_mutex, image_acquire_ibuf(), and Image::runtime.
Referenced by blender::draw::image_engine::SpaceNodeAccessor::acquire_image_buffer(), blender::bke::pbvh::pixels::apply_watertight_check(), blender::ed::space_node::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_save_options_init(), BKE_image_scale(), BKE_image_update_gputexture(), BKE_paint_canvas_key_get(), blender::bke::pbvh::pixels::BKE_pbvh_pixels_mark_image_dirty(), clear_single_image(), cmp_node_image_create_outputs(), colorfn(), blender::compositor::ImageNode::convert_to_operations(), cryptomatte_init_from_node_image(), blender::bke::pbvh::pixels::do_encode_pixels(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::paint::image::do_push_undo_tile(), blender::ed::space_node::draw_nodespace_back_pix(), draw_plane_marker_image(), ED_space_image_acquire_buffer(), ED_space_node_color_sample(), ED_space_node_get_position(), blender::io::usd::export_in_memory_texture(), eyedropper_cryptomatte_sample_image_fl(), finish_images(), blender::compositor::BaseImageOperation::get_im_buf(), blender::io::usd::get_in_memory_texture_filename(), gpencil_boundaryfill_area(), gpencil_erase_processed_area(), gpencil_find_and_mark_empty_areas(), gpencil_get_outline_points(), gpencil_image_texture_get(), gpencil_invert_image(), gpencil_set_borders(), gpu_texture_create_tile_array(), icon_preview_startjob(), image_camera_background_texture_get(), image_file_format_writable(), image_flip_exec(), image_from_context_has_data_poll(), image_get_gpu_texture(), image_invert_exec(), image_rect_update(), image_save_single(), image_scale_exec(), image_scale_invoke(), image_undosys_step_encode(), blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction::ImageFieldsFunction(), blender::bke::image::partial_update::ImageTileData::init_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_map(), RE_bake_ibuf_clear(), render_endjob(), blender::ed::space_node::sample_apply(), screen_opengl_render_apply(), blender::bke::image::partial_update::ImagePartialUpdateTest::SetUp(), blender::ed::space_node::snode_bg_viewmove_invoke(), texture_paint_camera_project_exec(), tile_fill_init(), trace_start_job(), uhandle_restore_list(), uiTemplateImage(), uiTemplateImageInfo(), blender::ed::space_node::viewer_border_exec(), blender::ed::space_node::WIDGETGROUP_node_corner_pin_refresh(), blender::ed::space_node::WIDGETGROUP_node_crop_refresh(), blender::ed::space_node::WIDGETGROUP_node_sbeam_refresh(), blender::ed::space_node::WIDGETGROUP_node_transform_refresh(), and write_internal_bake_pixels().
RenderResult* BKE_image_acquire_renderresult | ( | Scene * | scene, |
Image * | ima | ||
) |
Definition at line 3673 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_renderslot(), BKE_image_partial_update_mark_full_update(), IMA_TYPE_R_RESULT, image_init_multilayer_multiview(), Image::last_render_slot, RE_AcquireResultRead(), RE_GetSceneRender(), RenderSlot::render, Image::render_slot, Image::rr, scene, and Image::type.
Referenced by draw_render_info(), image_save_single(), ui_imageuser_layer_menu(), ui_imageuser_layer_menu_step(), ui_imageuser_pass_menu(), ui_imageuser_pass_menu_step(), ui_imageuser_view_menu_rr(), uiTemplateImage(), and uiTemplateImageLayers().
Create an image from ibuf. The reference-count of ibuf is increased, caller should take care to drop its reference by calling IMB_freeImBuf if needed.
Definition at line 1215 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_replace_imbuf(), BLI_path_basename(), IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_TYPE_IMAGE, image_alloc(), and ImBuf::name.
Referenced by gpencil_render_offscreen(), new_image_from_plane_marker_exec(), and texture_paint_image_from_view_exec().
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], | ||
bool | stereo3d, | ||
bool | is_data, | ||
bool | tiled | ||
) |
Adds new image block, creates ImBuf and initializes color.
Definition at line 1127 of file source/blender/blenkernel/intern/image.cc.
References add_ibuf_size(), color, COLOR_ROLE_DATA, Image::colorspace_settings, copy_v4_v4(), Image::filepath, Image::gen_color, Image::gen_depth, Image::gen_flag, Image::gen_type, Image::gen_x, Image::gen_y, height, IMA_GEN_FLOAT, IMA_NO_INDEX, IMA_SRC_GENERATED, IMA_SRC_TILED, IMA_TYPE_IMAGE, IMA_TYPE_UV_TEST, image_add_view(), image_alloc(), image_assign_ibuf(), IMB_colormanagement_role_colorspace_name_get(), IMB_freeImBuf(), ColorManagedColorspaceSettings::name, names, STEREO_LEFT_NAME, STEREO_RIGHT_NAME, STRNCPY, and width.
Referenced by blender::io::obj::create_placeholder_image(), image_new_exec(), and proj_paint_image_create().
RenderSlot* BKE_image_add_renderslot | ( | Image * | ima, |
const char * | name | ||
) |
Definition at line 5453 of file source/blender/blenkernel/intern/image.cc.
References BLI_addtail(), BLI_listbase_count(), BLI_snprintf(), BLI_strncpy(), DATA_, RenderSlot::name, and Image::renderslots.
Referenced by BKE_image_backup_render(), image_add_render_slot_exec(), and image_init().
Definition at line 3266 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_partial_update_mark_full_update(), BLI_addtail(), BLI_insertlinkbefore(), BLI_strncpy(), ListBase::first, GPU_texture_free(), Image::gputexture, IMA_SRC_TILED, IMA_UDIM_MAX, label, ImageTile::next, Image::source, TEXTARGET_2D_ARRAY, TEXTARGET_TILE_MAPPING, tile, ImageTile::tile_number, and Image::tiles.
Referenced by BKE_image_signal(), image_open_single(), and tile_add_exec().
Does all images with type MOVIE or SEQUENCE.
Definition at line 1556 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_anim_ibufs(), BKE_image_is_animated(), ListBase::first, Image::id, Main::images, and ID::next.
Referenced by do_render_full_pipeline().
Definition at line 943 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_alpha_mode_from_extension_ex(), and image().
Referenced by blo_do_versions_260().
char BKE_image_alpha_mode_from_extension_ex | ( | const char * | filepath | ) |
Set an alpha mode based on file extension.
Definition at line 934 of file source/blender/blenkernel/intern/image.cc.
References BLI_path_extension_check_n(), IMA_ALPHA_PREMUL, and IMA_ALPHA_STRAIGHT.
Referenced by BKE_image_alpha_mode_from_extension(), and SEQ_alpha_mode_from_file_extension().
For multiple slot render, call this before render.
Definition at line 3719 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_add_renderslot(), BKE_image_clear_renderslot(), BKE_image_get_renderslot(), BLI_listbase_count(), ListBase::first, Image::last_render_slot, RE_GetSceneRender(), RE_SwapResult(), RenderSlot::render, Image::render_slot, Image::renderslots, and scene.
Referenced by ED_node_composite_job(), screen_opengl_render_init(), screen_render_exec(), and screen_render_invoke().
Definition at line 5277 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_format_from_imbuf(), BKE_imtype_to_ftype(), ImBuf::ftype, and ImageFormatData::imtype.
Referenced by BKE_image_is_dirty_writable(), and image_file_format_writable().
Definition at line 5535 of file source/blender/blenkernel/intern/image.cc.
References BLI_findlink(), G, Image::last_render_slot, RE_ClearResult(), RE_FreeRenderResult(), RE_GetSceneRender(), RenderSlot::render, Image::renderslots, and ImageUser::scene.
Referenced by BKE_image_backup_render(), and image_clear_render_slot_exec().
Definition at line 4979 of file source/blender/blenkernel/intern/image.cc.
References ListBase::first, wmWindowManager::id, image_editors_update_frame(), image_walk_id_all_users(), and Main::wm.
void BKE_image_ensure_tile_token | ( | char * | filename | ) |
Ensures that filename
contains a UDIM token if we find a supported format pattern.
Definition at line 3429 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_filename_tokenized(), BLI_assert_msg, BLI_path_slash_find(), BLI_strncpy(), FILE_MAX, and direntry::path.
Referenced by BKE_image_get_tile_info(), BKE_packedfile_unpack_image(), do_versions_after_linking_300(), image_file_browse_exec(), and blender::bke::tests::TEST().
Ensures an Image exists for viewing nodes or render forces existence of 1 Image for render-output or nodes, returns Image.
name | Only for default, when making new one. |
Definition at line 2617 of file source/blender/blenkernel/intern/image.cc.
References ListBase::first, Image::id, id_us_ensure_real(), IMA_SRC_VIEWER, image_alloc(), Main::images, ImBuf::name, ID::next, Image::source, type, Image::type, and ID::us.
Referenced by blender::ed::space_node::backimage_fit_exec(), blender::compositor::CompositorOperation::deinit_execution(), blender::ed::space_node::draw_nodespace_back_pix(), ED_node_composite_job(), ED_node_set_active(), ED_space_node_color_sample(), ED_space_node_get_position(), blender::draw::image_engine::SpaceNodeAccessor::get_image(), image_read_viewlayers_exec(), blender::nodes::node_composite_split_viewer_cc::node_composit_init_splitviewer(), blender::nodes::node_composite_viewer_cc::node_composit_init_viewer(), render_view_open(), blender::ed::space_node::sample_apply(), screen_opengl_render_init(), screen_render_exec(), screen_render_invoke(), blender::ed::space_node::snode_bg_viewmove_invoke(), blender::ed::space_node::viewer_border_exec(), blender::ed::space_node::WIDGETGROUP_node_corner_pin_refresh(), blender::ed::space_node::WIDGETGROUP_node_crop_refresh(), blender::ed::space_node::WIDGETGROUP_node_sbeam_refresh(), blender::ed::space_node::WIDGETGROUP_node_transform_refresh(), and wm_draw_region_stereo_set().
void BKE_image_ensure_viewer_views | ( | const RenderData * | rd, |
Image * | ima, | ||
ImageUser * | iuser | ||
) |
Definition at line 2658 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_views(), BKE_scene_multiview_is_render_view_active(), BKE_scene_multiview_is_stereo3d(), BKE_scene_multiview_num_views_get(), BLI_findstring(), BLI_listbase_count(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_thread_lock(), BLI_thread_unlock(), Image_Runtime::cache_mutex, ListBase::first, ImageUser::flag, IMA_SHOW_STEREO, image_free_cached_frames(), image_viewer_create_views(), LOCK_DRAW_IMAGE, ImageView::name, ImBuf::name, ImageView::next, R_MULTIVIEW, Image::runtime, RenderData::scemode, Image::views, and RenderData::views.
void BKE_image_file_format_set | ( | Image * | image, |
int | ftype, | ||
const ImbFormatOptions * | options | ||
) |
Definition at line 5285 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), ImBuf::foptions, ImBuf::ftype, image(), IMB_moviecacheIter_done(), IMB_moviecacheIter_free(), IMB_moviecacheIter_getImBuf(), IMB_moviecacheIter_new(), IMB_moviecacheIter_step(), and options.
bool BKE_image_fill_tile | ( | struct Image * | ima, |
ImageTile * | tile, | ||
int | width, | ||
int | height, | ||
const float | color[4], | ||
int | gen_type, | ||
int | planes, | ||
bool | is_float | ||
) |
Definition at line 3397 of file source/blender/blenkernel/intern/image.cc.
References add_ibuf_size(), BKE_image_release_ibuf(), color, Image::colorspace_settings, Image::filepath, height, IMA_SRC_TILED, image_assign_ibuf(), image_free_tile(), Image::source, tile, and width.
Referenced by do_fill_tile().
Definition at line 900 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_find_nearest_tile_with_offset(), and image().
int BKE_image_find_nearest_tile_with_offset | ( | const Image * | image, |
const float | co[2], | ||
float | r_uv_offset[2] | ||
) |
Definition at line 866 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_tile_uv(), copy_v2_v2(), image(), len_squared_v2v2(), LISTBASE_FOREACH, and tile.
Referenced by BKE_image_find_nearest_tile().
Goes over all textures that use images.
Definition at line 1496 of file source/blender/blenkernel/intern/image.cc.
References Image::cache, ListBase::first, Image::id, Tex::id, Tex::ima, image_mem_size(), imagecache_check_dirty(), Main::images, IMB_moviecache_cleanup(), LIB_TAG_DOIT, ID::next, ID::tag, tex, and Main::textures.
Operates on one image only!
except_frame | This is weak, only works for sequences without offset. |
Definition at line 1547 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), Image::cache, Image_Runtime::cache_mutex, imagecache_check_free_anim(), IMB_moviecache_cleanup(), and Image::runtime.
Referenced by BKE_image_all_free_anim_ibufs().
Definition at line 620 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_buffers_ex().
Referenced by BKE_image_replace_imbuf(), BKE_image_signal(), image_blend_read_lib(), image_free_data(), and image_load_image_file().
Simply free the image data from memory, on display the image can load again (except for render buffers).
Definition at line 599 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_gputextures(), BLI_mutex_lock(), BLI_mutex_unlock(), Image_Runtime::cache_mutex, image_free_anims(), image_free_cached_frames(), RE_FreeRenderResult(), Image::rr, and Image::runtime.
Referenced by BKE_image_free_buffers().
Free (or release) any data used by this image (does not free the image itself).
Definition at line 625 of file source/blender/blenkernel/intern/image.cc.
References Image::id, and image_free_data().
Definition at line 576 of file source/blender/blenkernel/intern/image.cc.
References image_free_packedfiles().
Referenced by image_save_as_exec().
Definition at line 581 of file source/blender/blenkernel/intern/image.cc.
References BLI_freelistN(), and image().
Referenced by BKE_image_ensure_viewer_views(), image_free_data(), image_init_multilayer_multiview(), image_open_single(), and image_update_views_format().
Definition at line 5133 of file source/blender/blenkernel/intern/image.cc.
References image().
Referenced by BKE_mask_coord_from_image(), BKE_mask_coord_to_image(), ED_image_get_uv_aspect(), and ED_space_image_get_aspect().
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 5351 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), image(), IMB_moviecacheIter_done(), IMB_moviecacheIter_free(), IMB_moviecacheIter_getImBuf(), IMB_moviecacheIter_new(), and IMB_refImBuf().
Definition at line 5176 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_imageuser_default(), ImageUser::framenr, image(), lock, MEM_dupallocN, ImBuf::rect_float, tile, and ImageUser::tile.
References the result, BKE_image_release_ibuf is to be called to de-reference. Use lock=NULL when calling BKE_image_release_ibuf().
Definition at line 5327 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), image(), IMB_moviecacheIter_done(), IMB_moviecacheIter_free(), IMB_moviecacheIter_getImBuf(), IMB_moviecacheIter_new(), IMB_moviecacheIter_step(), IMB_refImBuf(), ImBuf::name, and STREQ.
unsigned char* BKE_image_get_pixels_for_frame | ( | struct Image * | image, |
int | frame, | ||
int | tile | ||
) |
Definition at line 5146 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_imageuser_default(), ImageUser::framenr, if(), image(), lock, MEM_dupallocN, ImBuf::rect, tile, and ImageUser::tile.
RenderSlot* BKE_image_get_renderslot | ( | Image * | ima, |
int | index | ||
) |
Definition at line 5563 of file source/blender/blenkernel/intern/image.cc.
References BLI_findlink(), and Image::renderslots.
Referenced by BKE_image_acquire_renderresult(), BKE_image_backup_render(), ED_image_slot_cycle(), image_cycle_render_slot_exec(), image_get_render_result(), and uiblock_layer_pass_buttons().
Definition at line 5097 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), BKE_render_resolution(), IMA_TYPE_R_RESULT, image(), IMG_SIZE_FALLBACK, lock, Scene::r, ImageUser::scene, ImBuf::x, and ImBuf::y.
Referenced by BKE_image_get_size_fl(), and ED_image_get_uv_aspect().
Definition at line 5124 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_size(), float(), height, image(), and width.
Referenced by BKE_mask_coord_from_image(), BKE_mask_coord_to_image(), OVERLAY_edit_uv_cache_init(), and WIDGETGROUP_empty_image_refresh().
Definition at line 795 of file source/blender/blenkernel/intern/image.cc.
References ELEM, ListBase::first, IMA_SRC_TILED, IMA_UDIM_MAX, LISTBASE_FOREACH, Image::source, tile, and Image::tiles.
Referenced by BKE_image_get_tile_from_iuser(), BKE_image_get_tile_from_pos(), and BKE_image_signal().
Definition at line 821 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_tile(), and image_get_tile_number_from_iuser().
Referenced by image_init_after_load(), and image_quick_test().
Definition at line 826 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_tile(), copy_v2_v2(), IMA_SRC_TILED, Image::source, sub_v2_v2(), and zero_v2().
Referenced by ED_space_image_color_sample(), image_sample_apply(), image_sample_line_exec(), imagewrap(), paint_2d_bucket_fill(), paint_2d_gradient_fill(), and paint_sample_color().
bool BKE_image_get_tile_info | ( | char * | filepath, |
struct ListBase * | tiles, | ||
int * | r_tile_start, | ||
int * | r_tile_range | ||
) |
Checks whether the given filepath refers to a UDIM tiled texture. If yes, the range from the lowest to the highest tile is returned.
filepath | may be modified to ensure a UDIM token is present. |
tiles | may be filled even if the result ultimately is false! |
Definition at line 3215 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_ensure_tile_token(), BKE_image_get_tile_number_from_filepath(), BKE_image_get_tile_strformat(), BKE_image_is_filename_tokenized(), BLI_addtail(), BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_genericNodeN(), BLI_join_dirfile(), BLI_split_dirfile(), dirname(), FILE_MAX, FILE_MAXDIR, FILE_MAXFILE, id, IMA_UDIM_MAX, max_ii(), MEM_SAFE_FREE, min_ii(), POINTER_FROM_INT, direntry::relname, tiles, and type.
Referenced by BKE_image_signal(), and image_detect_frame_range().
void BKE_image_get_tile_label | ( | struct Image * | ima, |
struct ImageTile * | tile, | ||
char * | label, | ||
int | len_label | ||
) |
Get tile index for tiled images.
Definition at line 3200 of file source/blender/blenkernel/intern/image.cc.
References BLI_snprintf(), BLI_strncpy(), label, and tile.
bool BKE_image_get_tile_number_from_filepath | ( | const char * | filepath, |
const char * | pattern, | ||
eUDIM_TILE_FORMAT | tile_format, | ||
int * | r_tile_number | ||
) |
Definition at line 3513 of file source/blender/blenkernel/intern/image.cc.
References result, UDIM_TILE_FORMAT_UDIM, UDIM_TILE_FORMAT_UVTILE, and v.
Referenced by BKE_image_get_tile_info(), BKE_image_tile_filepath_exists(), and blender::bke::tests::TEST().
char* BKE_image_get_tile_strformat | ( | const char * | filepath, |
eUDIM_TILE_FORMAT * | r_tile_format | ||
) |
Retrieves the UDIM token format and returns the pattern from the provided filepath
. The returned pattern is typically passed to either BKE_image_get_tile_number_from_filepath or BKE_image_set_filepath_from_tile_number.
Definition at line 3494 of file source/blender/blenkernel/intern/image.cc.
References BLI_str_replaceN(), UDIM_TILE_FORMAT_NONE, UDIM_TILE_FORMAT_UDIM, and UDIM_TILE_FORMAT_UVTILE.
Referenced by BKE_image_get_tile_info(), BKE_image_save(), BKE_image_tile_filepath_exists(), BKE_image_user_file_path_ex(), blender::io::usd::copy_tiled_textures(), image_foreach_path(), and blender::bke::tests::TEST().
Definition at line 854 of file source/blender/blenkernel/intern/image.cc.
References IMA_SRC_TILED, Image::source, tile_index, and zero_v2().
Referenced by BKE_image_find_nearest_tile_with_offset().
Check if texture has alpha planes == 32 || planes == 16
.
Definition at line 5083 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_acquire_ibuf(), BKE_image_release_ibuf(), image(), lock, and ImBuf::planes.
Referenced by uiTemplateImage().
Definition at line 5211 of file source/blender/blenkernel/intern/image.cc.
References Image::anims, and BLI_listbase_is_empty().
Referenced by BKE_image_load_exists_ex(), image_match_len_exec(), and uiTemplateImageInfo().
Definition at line 5221 of file source/blender/blenkernel/intern/image.cc.
References Image::filepath.
Checks whether there's an image buffer for given image and user.
Definition at line 4708 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), Image_Runtime::cache_mutex, image_acquire_ibuf(), image_get_cached_ibuf(), image_quick_test(), IMB_freeImBuf(), and Image::runtime.
Referenced by draw_plane_marker_ex(), image_from_context_has_data_poll_active_tile(), image_to_gpencil_poll(), palette_extract_img_poll(), project_paint_prepare_all_faces(), tile_add_poll(), and tile_fill_poll().
Definition at line 5304 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), image(), IMB_moviecacheIter_done(), IMB_moviecacheIter_free(), IMB_moviecacheIter_getImBuf(), IMB_moviecacheIter_new(), and IMB_moviecacheIter_step().
Referenced by imagewrap(), imagewraposa(), and imagewraposa_aniso().
Checks whether the image consists of multiple buffers.
Definition at line 5233 of file source/blender/blenkernel/intern/image.cc.
References ELEM, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_TILED, and image().
Referenced by image_get_multiview_index().
Check if texture has GPU texture code.
Definition at line 776 of file source/blender/blenkernel/intern/image.cc.
References Image::gputexture, and TEXTARGET_COUNT.
Referenced by BKE_image_free_old_gputextures(), and BKE_image_paint_set_mipmap().
Definition at line 5216 of file source/blender/blenkernel/intern/image.cc.
References BLI_listbase_is_empty(), and Image::packedfiles.
Referenced by BKE_image_signal(), image_foreach_path(), and image_load_image_file().
Definition at line 2941 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_multilayer_index(), ImageUser::layer, ImageUser::multi_index, ImageUser::pass, Image::rr, and ImageUser::view.
Referenced by BKE_image_signal(), and image_open_exec().
Checks the image buffer changes with time (not keyframed values).
Definition at line 5228 of file source/blender/blenkernel/intern/image.cc.
References ELEM, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, and image().
Referenced by BKE_image_all_free_anim_ibufs(), BKE_image_free_anim_gputextures(), BKE_image_user_frame_calc(), BKE_texture_dependsOnTime(), image_editors_update_frame(), image_tag_frame_recalc(), image_user_id_eval_animation(), image_user_id_has_animation(), MOD_init_texture(), blender::nodes::node_geo_image_texture_cc::node_geo_exec(), and uiTemplateImage().
Definition at line 5267 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_dirty_writable(), and image().
Referenced by blender::io::usd::export_texture(), blender::io::usd::get_in_memory_texture_filename(), image_foreach_path(), image_pack_exec(), blender::ed::space_node::node_buts_image_user(), pack_all_invoke(), and uiTemplateImage().
Definition at line 5238 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_buffer_format_writable(), BLI_mutex_lock(), BLI_mutex_unlock(), IB_BITMAPDIRTY, image(), IMB_moviecacheIter_done(), IMB_moviecacheIter_free(), IMB_moviecacheIter_getImBuf(), IMB_moviecacheIter_new(), IMB_moviecacheIter_step(), and ImBuf::userflags.
Referenced by BKE_image_is_dirty(), and image_should_be_saved().
bool BKE_image_is_filename_tokenized | ( | char * | filepath | ) |
Checks if the filename portion of the path contains a UDIM token.
Definition at line 3423 of file source/blender/blenkernel/intern/image.cc.
References BLI_path_basename().
Referenced by BKE_image_ensure_tile_token(), and BKE_image_get_tile_info().
Definition at line 3616 of file source/blender/blenkernel/intern/image.cc.
References ELEM, IMA_SRC_FILE, IMA_SRC_SEQUENCE, IMA_SRC_TILED, IMA_SRC_VIEWER, IMA_TYPE_MULTILAYER, IMA_TYPE_R_RESULT, Image::source, and Image::type.
Referenced by image_get_multiview_index().
Definition at line 3631 of file source/blender/blenkernel/intern/image.cc.
References ListBase::first, view, and Image::views.
Referenced by BKE_image_is_stereo(), BKE_image_memorypack(), BKE_image_reassign_tile(), BKE_image_user_file_path_ex(), image_free_tile(), image_get_multiview_index(), image_load_image_file(), image_load_movie_file(), image_num_viewfiles(), and image_update_views_format().
For multi-layer images as well as for single-layer.
Definition at line 3707 of file source/blender/blenkernel/intern/image.cc.
References BLI_path_extension_check(), ELEM, Image::filepath, IMA_SRC_FILE, IMA_SRC_SEQUENCE, IMA_SRC_TILED, Image::source, and UNUSED_VARS.
Definition at line 3637 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_multiview(), BLI_findstring(), STEREO_LEFT_NAME, STEREO_RIGHT_NAME, and Image::views.
Referenced by BKE_image_multiview_index(), image_get_multiview_index(), image_get_render_result(), image_load_image_file(), and image_load_movie_file().
Returns a new image or NULL if it can't load.
Definition at line 948 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_tile_filepath_exists(), BKE_main_blendfile_path(), BLI_open(), BLI_path_abs(), BLI_path_basename(), BLI_path_extension_check_array(), file, FILE_MAX, Image::filepath, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_TYPE_IMAGE, image_alloc(), image_init_color_management(), imb_ext_movie, O_BINARY, Image::source, str, and STRNCPY.
Referenced by BKE_image_load_exists_ex().
Definition at line 1013 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_load_exists_ex().
Referenced by blender::io::obj::load_image_at_path(), blender::io::usd::USDMaterialReader::load_tex_image(), and DocumentImporter::writeImage().
Returns existing Image when filename/type is same.
Checks if image was already loaded, then returns same image otherwise creates new (does not load ibuf itself).
Definition at line 980 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_has_anim(), BKE_image_load(), BLI_path_abs(), BLI_path_cmp, ELEM, FILE_MAX, Main::filepath, Image::filepath, ListBase::first, Image::id, ID_BLEND_PATH, id_us_plus(), IMA_SRC_GENERATED, IMA_SRC_VIEWER, Main::images, ID::next, Image::source, str, STRNCPY, and ID::us.
Referenced by BKE_image_load_exists(), image_open_single(), and WM_operator_drop_load_path().
Definition at line 5272 of file source/blender/blenkernel/intern/image.cc.
References IB_BITMAPDIRTY, and ImBuf::userflags.
Referenced by BKE_image_replace_imbuf(), and BKE_image_scale().
Pack image to memory.
Definition at line 1300 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_multiview(), BKE_image_user_file_path(), BKE_imageuser_default(), BLI_findlink(), BLI_path_suffix(), FILE_MAX, ImageView::filepath, IMA_NO_INDEX, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_SRC_TILED, IMA_TYPE_IMAGE, image_free_packedfiles(), image_get_cached_ibuf_for_index_entry(), image_memorypack_imbuf(), image_num_viewfiles(), IMB_freeImBuf(), LISTBASE_FOREACH, ImBuf::name, R_IMF_VIEWS_INDIVIDUAL, R_IMF_VIEWS_STEREO_3D, Image::source, STEREO_LEFT_SUFFIX, STEREO_RIGHT_SUFFIX, tile, Image::tiles, Image::type, view, Image::views, and Image::views_format.
Referenced by ED_image_save_all_modified(), image_pack_exec(), and image_save_exec().
Merge source into dest
, and free source
.
Definition at line 730 of file source/blender/blenkernel/intern/image.cc.
References BKE_id_free(), BLI_mutex_lock(), BLI_mutex_unlock(), Image::cache, Image_Runtime::cache_mutex, dest, imagecache_put(), IMB_moviecacheIter_done(), IMB_moviecacheIter_free(), IMB_moviecacheIter_getImBuf(), IMB_moviecacheIter_getUserKey(), IMB_moviecacheIter_new(), IMB_moviecacheIter_step(), ImageCacheKey::index, and Image::runtime.
Referenced by local_merge().
RenderPass* BKE_image_multilayer_index | ( | struct RenderResult * | rr, |
struct ImageUser * | iuser | ||
) |
Sets index offset for multi-layer files and because rendered results use fake layer/passes, don't correct for wrong indices here.
Definition at line 3562 of file source/blender/blenkernel/intern/image.cc.
References BLI_listbase_count(), ListBase::first, ImageUser::flag, IMA_SHOW_STEREO, image_render_pass_get(), ImageUser::layer, RenderResult::layers, ImageUser::multi_index, ImageUser::multiview_eye, RenderLayer::next, ImageUser::pass, RenderLayer::passes, RE_HasCombinedLayer(), RE_RenderResult_is_stereo(), and ImageUser::view.
Referenced by BKE_image_init_imageuser(), blender::draw::image_engine::ImageEngine< DrawingMode >::cache_populate(), blender::draw::image_engine::SpaceImageAccessor::get_gpu_textures(), blender::compositor::MultilayerBaseOperation::get_im_buf(), image_get_ibuf_multilayer(), image_load_sequence_multilayer(), image_multi_cb(), image_save_single(), ui_imageuser_layer_menu_step(), and ui_imageuser_pass_menu_step().
Definition at line 3595 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_stereo(), BLI_listbase_count_at_most(), ImageUser::flag, IMA_SHOW_STEREO, ImageUser::multi_index, ImageUser::multiview_eye, ImageUser::view, and Image::views.
void BKE_image_packfiles | ( | ReportList * | reports, |
Image * | ima, | ||
const char * | basepath | ||
) |
Definition at line 1357 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_user_file_path(), BKE_imageuser_default(), BKE_packedfile_new(), BLI_addtail(), BLI_freelinkN(), FILE_MAX, ImagePackedFile::filepath, image_num_viewfiles(), LISTBASE_FOREACH, MEM_mallocN, ImagePackedFile::packedfile, Image::packedfiles, STRNCPY, tile, ImagePackedFile::tile_number, Image::tiles, view, and ImagePackedFile::view.
Referenced by BKE_image_signal(), BKE_packedfile_pack_all(), and image_pack_exec().
void BKE_image_packfiles_from_mem | ( | ReportList * | reports, |
Image * | ima, | ||
char * | data, | ||
const size_t | data_len | ||
) |
Definition at line 1387 of file source/blender/blenkernel/intern/image.cc.
References BKE_packedfile_new_from_memory(), BKE_report(), BLI_addtail(), data, ImagePackedFile::filepath, Image::filepath, IMA_SRC_TILED, image_num_viewfiles(), MEM_mallocN, ImagePackedFile::packedfile, Image::packedfiles, RPT_ERROR, Image::source, STRNCPY, ImagePackedFile::tile_number, and ImagePackedFile::view.
Definition at line 4801 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_acquire_ibuf(), BLI_addtail(), BLI_mempool_alloc(), BLI_mutex_lock(), BLI_mutex_unlock(), ImagePoolItem::entry, ImagePoolItem::ibuf, ImagePoolItem::image, image_get_entry_and_index(), image_pool_find_item(), image_quick_test(), ImagePoolItem::index, and blender::compositor::pool.
Referenced by BKE_texture_fetch_images_for_pool(), image_sample(), imagewrap(), imagewraposa(), imagewraposa_aniso(), load_tex_task_cb_ex(), multitex_nodes_intern(), paint_stroke_new(), and texture_nodes_fetch_images_for_pool().
Definition at line 4762 of file source/blender/blenkernel/intern/image.cc.
References BLI_mempool_destroy(), BLI_mutex_end(), BLI_mutex_lock(), BLI_mutex_unlock(), IMB_freeImBuf(), MEM_freeN, ImagePoolItem::next, and blender::compositor::pool.
Referenced by BKE_sculptsession_free(), brush_painter_2d_refresh_cache(), blender::compositor::TextureBaseOperation::deinit_execution(), displaceModifier_do(), dynamicPaint_setInitialColor(), load_tex(), project_paint_op(), and shader_preview_texture().
Definition at line 4752 of file source/blender/blenkernel/intern/image.cc.
References BLI_mempool_create(), BLI_MEMPOOL_NOP, BLI_mutex_init(), and blender::compositor::pool.
Referenced by brush_painter_2d_refresh_cache(), displaceModifier_do(), dynamicPaint_setInitialColor(), blender::compositor::TextureBaseOperation::init_execution(), load_tex(), project_paint_op(), sculpt_brush_init_tex(), sculpt_expand_ensure_sculptsession_data(), and shader_preview_texture().
Definition at line 4855 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_release_ibuf(), and blender::compositor::pool.
Referenced by image_sample(), imagewrap(), imagewraposa(), imagewraposa_aniso(), load_tex_task_cb_ex(), multitex_nodes_intern(), and paint_stroke_new().
Prints memory statistics for images.
Definition at line 1466 of file source/blender/blenkernel/intern/image.cc.
References ListBase::first, Image::id, image_mem_size(), Main::images, ID::name, ID::next, and size().
Definition at line 3338 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_multiview(), BKE_image_partial_update_mark_full_update(), BLI_listbase_count(), GPU_texture_free(), Image::gputexture, IMA_SRC_TILED, IMA_UDIM_MAX, image_assign_ibuf(), image_get_cached_ibuf_for_index_entry(), image_remove_ibuf(), IMB_freeImBuf(), Image::source, TEXTARGET_2D_ARRAY, TEXTARGET_TILE_MAPPING, tile, and Image::views.
Definition at line 4688 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), BLI_thread_unlock(), Image_Runtime::cache_mutex, IMB_freeImBuf(), lock, LOCK_VIEWER, RE_ReleaseResultImage(), and Image::runtime.
Referenced by blender::bke::pbvh::pixels::apply_watertight_check(), blender::ed::space_node::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_save_options_init(), BKE_image_scale(), BKE_image_update_gputexture(), BKE_paint_canvas_key_get(), blender::bke::pbvh::pixels::BKE_pbvh_pixels_mark_image_dirty(), clear_single_image(), cmp_node_image_create_outputs(), colorfn(), blender::compositor::ImageNode::convert_to_operations(), cryptomatte_init_from_node_image(), blender::compositor::BaseImageOperation::deinit_execution(), blender::compositor::BaseImageOperation::determine_canvas(), blender::bke::pbvh::pixels::do_encode_pixels(), blender::ed::sculpt_paint::paint::image::do_paint_pixels(), blender::ed::sculpt_paint::paint::image::do_push_undo_tile(), blender::ed::space_node::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::bke::image::partial_update::ImageTileData::free_data(), blender::compositor::BaseImageOperation::get_im_buf(), gpencil_boundaryfill_area(), gpencil_erase_processed_area(), gpencil_find_and_mark_empty_areas(), 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_file_format_writable(), image_flip_exec(), image_from_context_has_data_poll(), image_get_gpu_texture(), image_invert_exec(), image_rect_update(), image_save_single(), image_scale_exec(), image_scale_invoke(), image_undosys_step_encode(), blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction::ImageFieldsFunction(), 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_map(), RE_bake_ibuf_clear(), blender::draw::image_engine::SpaceNodeAccessor::release_buffer(), render_endjob(), blender::ed::space_node::sample_apply(), screen_opengl_render_apply(), blender::ed::space_node::snode_bg_viewmove_invoke(), blender::bke::image::partial_update::ImagePartialUpdateTest::TearDown(), tile_fill_init(), trace_start_job(), uhandle_restore_list(), uiTemplateImage(), uiTemplateImageInfo(), blender::ed::space_node::viewer_border_exec(), blender::ed::space_node::WIDGETGROUP_node_corner_pin_refresh(), blender::ed::space_node::WIDGETGROUP_node_crop_refresh(), blender::ed::space_node::WIDGETGROUP_node_sbeam_refresh(), blender::ed::space_node::WIDGETGROUP_node_transform_refresh(), write_internal_bake_pixels(), and blender::nodes::node_geo_image_texture_cc::ImageFieldsFunction::~ImageFieldsFunction().
Definition at line 3695 of file source/blender/blenkernel/intern/image.cc.
References IMA_TYPE_R_RESULT, Image::last_render_slot, RE_GetSceneRender(), RE_ReleaseResult(), Image::render_slot, Image::rr, scene, and Image::type.
Referenced by draw_render_info(), image_save_single(), ui_imageuser_layer_menu(), ui_imageuser_layer_menu_step(), ui_imageuser_pass_menu(), ui_imageuser_pass_menu_step(), ui_imageuser_view_menu_rr(), uiTemplateImage(), and uiTemplateImageLayers().
Definition at line 5467 of file source/blender/blenkernel/intern/image.cc.
References BLI_findindex(), BLI_findlink(), BLI_listbase_count(), BLI_remlink(), G, Image::last_render_slot, MEM_freeN, RE_FreeRenderResult(), RE_GetSceneRender(), RE_SwapResult(), RenderSlot::render, Image::render_slot, Image::renderslots, and ImageUser::scene.
Referenced by image_remove_render_slot_exec().
Definition at line 3320 of file source/blender/blenkernel/intern/image.cc.
References BLI_listbase_is_single(), BLI_remlink(), IMA_SRC_TILED, image_free_tile(), MEM_freeN, Image::source, tile, and Image::tiles.
Referenced by BKE_image_signal(), and tile_remove_exec().
For a non-viewer single-buffer image (single frame file, or generated image) replace its image buffer with the given one. If an unsupported image type (multi-layer, image sequence, ...) the function will assert in the debug mode and will have an undefined behavior in the release mode.
Definition at line 1237 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_buffers(), BKE_image_mark_dirty(), BLI_assert, ELEM, IMA_GEN_FLOAT, IMA_NO_INDEX, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_TYPE_IMAGE, image(), image_assign_ibuf(), image_colorspace_from_imbuf(), ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by BKE_image_add_from_imbuf(), and update_image_from_plane_marker_exec().
Scale the image.
Definition at line 756 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_acquire_ibuf(), BKE_image_mark_dirty(), BKE_image_release_ibuf(), height, image(), IMB_scaleImBuf(), lock, and width.
int BKE_image_sequence_guess_offset | ( | struct Image * | image | ) |
Guess offset for the first frame in the sequence.
Definition at line 5206 of file source/blender/blenkernel/intern/image.cc.
References BLI_path_sequence_decode(), and image().
Referenced by cmp_node_image_create_outputs().
void BKE_image_set_filepath_from_tile_number | ( | char * | filepath, |
const char * | pattern, | ||
eUDIM_TILE_FORMAT | tile_format, | ||
int | tile_number | ||
) |
Definition at line 3541 of file source/blender/blenkernel/intern/image.cc.
References UDIM_TILE_FORMAT_UDIM, UDIM_TILE_FORMAT_UVTILE, and v.
Referenced by BKE_image_save(), BKE_image_user_file_path_ex(), blender::io::usd::copy_tiled_textures(), image_foreach_path(), and blender::bke::tests::TEST().
Definition at line 2982 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_add_tile(), BKE_image_free_buffers(), BKE_image_get_tile(), BKE_image_get_tile_info(), BKE_image_has_packedfile(), BKE_image_init_imageuser(), BKE_image_packfiles(), BKE_image_remove_tile(), BKE_image_walk_all_users(), BKE_ntree_update_main(), BKE_ntree_update_tag_id_changed(), BKE_packedfile_free(), BKE_packedfile_new(), BLI_assert, BLI_freelistN(), BLI_listbase_count(), BLI_listbase_count_at_most(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_path_abs(), BLI_strncpy(), Image_Runtime::cache_mutex, ELEM, FILE_MAX, ImagePackedFile::filepath, Image::filepath, ListBase::first, Image::gen_x, Image::gen_y, Image::id, ID_BLEND_PATH, ID_BLEND_PATH_FROM_GLOBAL, 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_num_viewfiles(), image_tag_frame_recalc(), image_tag_reload(), image_update_views_format(), IMB_freeImBuf(), ListBase::last, LISTBASE_FOREACH, MEM_freeN, ImagePackedFile::next, ImageTile::next, ImagePackedFile::packedfile, Image::packedfiles, pf, POINTER_AS_INT, result, Image::runtime, ImageUser::scene, Image::source, tile, ImageTile::tile_number, Image::tiles, Image::type, ImBuf::x, and ImBuf::y.
Referenced by BKE_image_save(), BKE_packedfile_unpack_image(), blender::compositor::CompositorOperation::deinit_execution(), ED_space_image_auto_set(), ED_space_image_set(), image_foreach_path(), image_new_exec(), image_open_exec(), image_reload_exec(), image_replace_exec(), blender::ed::space_node::node_add_file_exec(), proj_paint_add_slot(), screen_opengl_render_init(), screen_render_exec(), and screen_render_invoke().
Definition at line 3388 of file source/blender/blenkernel/intern/image.cc.
References BLI_listbase_sort(), IMA_SRC_TILED, Image::source, tile_sort_cb(), and Image::tiles.
Referenced by gpu_texture_create_tile_mapping(), and tile_add_exec().
void BKE_image_stamp_buf | ( | Scene * | scene, |
Object * | camera, | ||
const StampData * | stamp_data_template, | ||
unsigned char * | rect, | ||
float * | rectf, | ||
int | width, | ||
int | height, | ||
int | channels | ||
) |
Definition at line 1890 of file source/blender/blenkernel/intern/image.cc.
References RenderData::bg_stamp, BLF_buffer(), BLF_buffer_col(), BLF_descender(), BLF_disable(), BLF_draw_buffer(), BLF_enable(), BLF_height_max(), blf_mono_font_render, BLF_position(), BLF_size(), BLF_width_max(), BLF_WORD_WRAP, BLF_wordwrap(), buf_rectfill_area(), BUFF_MARGIN_X, BUFF_MARGIN_Y, StampData::camera, camera, StampData::cameralens, channels(), StampData::date, ColorManagedDisplaySettings::display_device, Scene::display_settings, RenderData::fg_stamp, StampData::file, StampData::frame, StampData::frame_range, height, StampData::hostname, IMB_colormanagement_display_get_named(), StampData::marker, StampData::memory, StampData::note, pad, Scene::r, R_STAMP_HIDE_LABELS, StampData::rendertime, StampData::scene, scene, RenderData::stamp, RenderData::stamp_font_id, stampdata(), stampdata_from_template(), StampData::strip, TEXT_SIZE_CHECK, TEXT_SIZE_CHECK_WORD_WRAP, StampData::time, w(), width, blender::bke::image::partial_update::wrap(), x, and y.
Definition at line 1411 of file source/blender/blenkernel/intern/image.cc.
References Image::lastused, and PIL_check_seconds_timer_i().
Referenced by image_acquire_ibuf(), image_get_gpu_texture(), image_init_after_load(), and multitex().
bool BKE_image_tile_filepath_exists | ( | const char * | filepath | ) |
When provided with an absolute virtual filepath
, check to see if at least one concrete file exists. NOTE: This function requires directory traversal and may be inefficient in time-critical, or iterative, code paths.
Definition at line 3458 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_tile_number_from_filepath(), BKE_image_get_tile_strformat(), BLI_assert, BLI_filelist_dir_contents(), BLI_filelist_free(), BLI_path_is_rel(), BLI_split_dir_part(), dirname(), FILE_MAXDIR, id, IMA_UDIM_MAX, MEM_SAFE_FREE, direntry::path, and type.
Referenced by BKE_image_load().
Definition at line 5035 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_user_file_path_ex(), and G_MAIN.
Referenced by BKE_image_memorypack(), BKE_image_packfiles(), image_init_color_management(), load_image_single(), and load_movie_single().
void 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 | ||
) |
Definition at line 5040 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_tile_strformat(), BKE_image_is_multiview(), BKE_image_set_filepath_from_tile_number(), BLI_findlink(), BLI_path_abs(), BLI_path_sequence_decode(), BLI_path_sequence_encode(), BLI_strncpy(), ELEM, FILE_MAX, ImageView::filepath, Image::filepath, ImageUser::framenr, Image::id, ID_BLEND_PATH, IMA_SRC_SEQUENCE, IMA_SRC_TILED, image_get_tile_number_from_iuser(), Image::lastframe, MEM_SAFE_FREE, Image::source, ImageUser::view, and Image::views.
Referenced by BKE_image_user_file_path().
Called on frame change or before render.
Definition at line 4929 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_animated(), BKE_image_partial_update_mark_full_update(), BKE_image_user_frame_get(), ImageUser::flag, ImageUser::framenr, Image::gpuframenr, IMA_NEED_FRAME_RECALC, and IMA_USER_FRAME_IN_RANGE.
Referenced by blender::compositor::ImageNode::convert_to_operations(), cryptomatte_init_from_node_image(), image_camera_background_texture_get(), image_editors_update_frame(), image_match_len_exec(), image_refresh(), image_user_id_eval_animation(), load_image_single(), MOD_init_texture(), and uiTemplateImage().
Definition at line 4865 of file source/blender/blenkernel/intern/image.cc.
References ImageUser::cycl, ImageUser::frames, len, ImageUser::offset, and ImageUser::sfra.
Referenced by BKE_image_user_frame_calc().
Definition at line 5024 of file source/blender/blenkernel/intern/image.cc.
References depsgraph, image_user_id_eval_animation(), and image_walk_id_all_users().
Referenced by blender::deg::DepsgraphNodeBuilder::build_animation_images().
Dependency graph update for image user users.
Definition at line 4997 of file source/blender/blenkernel/intern/image.cc.
References image_user_id_has_animation(), and image_walk_id_all_users().
Referenced by blender::deg::DepsgraphNodeBuilder::build_animation_images(), blender::deg::DepsgraphRelationBuilder::build_animation_images(), and blender::deg::DepsgraphRelationBuilder::build_texture().
void BKE_image_walk_all_users | ( | const Main * | mainp, |
void * | customdata, | ||
void | callbackImage *ima, ID *iuser_id, ImageUser *iuser, void *customdata | ||
) |
Definition at line 2853 of file source/blender/blenkernel/intern/image.cc.
References callback, Main::cameras, ListBase::first, bNodeTree::id, Scene::id, Tex::id, World::id, image_walk_id_all_users(), Main::materials, ID::next, Main::nodetrees, ntree, Main::objects, scene, Main::scenes, tex, Main::textures, Main::wm, and world.
Referenced by BKE_image_signal().
For reload, refresh, pack.
Definition at line 2934 of file source/blender/blenkernel/intern/image.cc.
References ImageUser::frames, and ImageUser::sfra.
Referenced by bake_images(), bake_object_check(), bake_targets_init_internal(), BKE_image_get_float_pixels_for_frame(), BKE_image_get_pixels_for_frame(), BKE_image_memorypack(), BKE_image_packfiles(), BKE_image_save(), BKE_image_save_options_init(), clear_single_image(), finish_images(), gpu_texture_create_tile_array(), icon_preview_startjob(), image_create(), image_save_single(), image_user_from_context_and_active_tile(), multiresbake_check(), blender::nodes::node_geo_image_texture_cc::node_geo_exec(), blender::nodes::node_shader_tex_environment_cc::node_shader_init_tex_environment(), blender::nodes::node_shader_tex_image_cc::node_shader_init_tex_image(), paint_2d_bucket_fill(), paint_sample_color(), project_paint_PickColor(), project_paint_prepare_all_faces(), texture_init_data(), tile_fill_init(), and write_internal_bake_pixels().
Definition at line 2484 of file source/blender/blenkernel/intern/image.cc.
References ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
Referenced by bake_ibuf_filter(), and image_save_single().
void BKE_imbuf_stamp_info | ( | const RenderResult * | rr, |
ImBuf * | ibuf | ||
) |
Definition at line 2456 of file source/blender/blenkernel/intern/image.cc.
References BKE_stamp_info_callback(), IMB_metadata_ensure(), ImBuf::metadata, metadata_set_field(), and RenderResult::stamp_data.
Referenced by BKE_imbuf_write_stamp(), image_get_ibuf_multilayer(), image_get_render_result(), and image_load_sequence_multilayer().
int BKE_imbuf_write | ( | ImBuf * | ibuf, |
const char * | name, | ||
const ImageFormatData * | imf | ||
) |
Definition at line 2507 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_format_to_imbuf(), BLI_make_existing_file(), IB_rect, IB_zbuf, IB_zbuffloat, and IMB_saveiff().
Referenced by BKE_imbuf_write_as(), and BKE_imbuf_write_stamp().
int BKE_imbuf_write_as | ( | ImBuf * | ibuf, |
const char * | name, | ||
const ImageFormatData * | imf, | ||
const bool | save_copy | ||
) |
Definition at line 2521 of file source/blender/blenkernel/intern/image.cc.
References BKE_imbuf_write(), ImBuf::foptions, ImBuf::ftype, ImBuf::planes, and ImageFormatData::planes.
int BKE_imbuf_write_stamp | ( | const Scene * | scene, |
const struct RenderResult * | rr, | ||
ImBuf * | ibuf, | ||
const char * | name, | ||
const struct ImageFormatData * | imf | ||
) |
Definition at line 2544 of file source/blender/blenkernel/intern/image.cc.
References BKE_imbuf_stamp_info(), BKE_imbuf_write(), Scene::r, R_STAMP_ALL, scene, and RenderData::stamp.
void BKE_render_result_stamp_data | ( | RenderResult * | rr, |
const char * | key, | ||
const char * | value | ||
) |
Definition at line 2399 of file source/blender/blenkernel/intern/image.cc.
References BLI_addtail(), BLI_strdup(), StampData::custom_fields, StampDataCustomField::key, MEM_mallocN, RenderResult::stamp_data, STRNCPY, and StampDataCustomField::value.
Referenced by add_render_result_meta_data(), blender::compositor::MetaData::add_to_render_result(), metadata_copy_custom_fields(), and blender::bke::cryptomatte::tests::TEST().
void BKE_render_result_stamp_info | ( | Scene * | scene, |
Object * | camera, | ||
struct RenderResult * | rr, | ||
bool | allocate_only | ||
) |
Definition at line 2285 of file source/blender/blenkernel/intern/image.cc.
References camera, Scene::r, R_STAMP_ALL, scene, RenderData::stamp, RenderResult::stamp_data, and stampdata().
Referenced by do_render_full_pipeline(), do_render_sequencer(), screen_opengl_render_write(), screen_opengl_views_setup(), and write_result().
Definition at line 2413 of file source/blender/blenkernel/intern/image.cc.
References BLI_duplicatelist(), StampData::custom_fields, LISTBASE_FOREACH, and MEM_dupallocN.
Definition at line 2429 of file source/blender/blenkernel/intern/image.cc.
References BLI_freelistN(), StampData::custom_fields, LISTBASE_FOREACH, and MEM_freeN.
Referenced by blender::compositor::OutputOpenExrMultiLayerOperation::deinit_execution(), blender::compositor::OutputOpenExrMultiLayerMultiViewOperation::get_handle(), and render_result_free().
void BKE_stamp_info_callback | ( | void * | data, |
struct StampData * | stamp_data, | ||
StampCallback | callback, | ||
bool | noskip | ||
) |
Definition at line 2358 of file source/blender/blenkernel/intern/image.cc.
References CALL, callback, camera, StampData::cameralens, StampData::custom_fields, data, StampData::date, file, StampData::frame, StampData::frame_range, StampData::hostname, LISTBASE_FOREACH, StampData::marker, StampData::memory, StampData::note, StampData::rendertime, scene, StampData::strip, and time.
Referenced by BKE_imbuf_stamp_info(), BKE_stamp_info_from_imbuf(), CryptomatteSession::CryptomatteSession(), blender::compositor::MultilayerColorOperation::get_meta_data(), blender::compositor::RenderLayersProg::get_meta_data(), IMB_exr_begin_write(), and blender::bke::cryptomatte::tests::TEST().
void BKE_stamp_info_from_imbuf | ( | RenderResult * | rr, |
ImBuf * | ibuf | ||
) |
Definition at line 2472 of file source/blender/blenkernel/intern/image.cc.
References BKE_stamp_info_callback(), IMB_metadata_ensure(), IMB_metadata_foreach(), ImBuf::metadata, metadata_copy_custom_fields(), metadata_get_field(), and RenderResult::stamp_data.
Referenced by do_render_sequencer().
Definition at line 2312 of file source/blender/blenkernel/intern/image.cc.
References Scene::r, R_STAMP_ALL, scene, RenderData::stamp, and stampdata().
bool BKE_stamp_is_known_field | ( | const char * | field_name | ) |
Check whether the given metadata field name translates to a known field of a stamp.
Definition at line 2346 of file source/blender/blenkernel/intern/image.cc.
References stamp_metadata_fields, and STREQ.
Referenced by metadata_copy_custom_fields(), and metadata_is_custom_drawable().
Definition at line 708 of file source/blender/blenkernel/intern/image.cc.
References BKE_packedfile_duplicate(), BLI_addtail(), BLI_listbase_clear(), ImagePackedFile::filepath, ListBase::first, MEM_mallocN, ImagePackedFile::next, ImagePackedFile::packedfile, STRNCPY, ImagePackedFile::tile_number, and ImagePackedFile::view.
Referenced by image_copy_data().
|
constexpr |
Definition at line 425 of file source/blender/blenkernel/intern/image.cc.
References BLT_I18NCONTEXT_ID_IMAGE, FILTER_ID_IM, IDTypeInfo::id_code, ID_IM, IDTYPE_FLAGS_APPEND_IS_REUSABLE, IDTYPE_FLAGS_NO_ANIMDATA, image_blend_read_data(), image_blend_read_lib(), image_blend_write(), image_copy_data(), image_foreach_cache(), image_foreach_path(), image_free_data(), image_init_data(), and INDEX_ID_IM.
Checks optional ImageUser and verifies/creates ImBuf.
Definition at line 4548 of file source/blender/blenkernel/intern/image.cc.
References add_ibuf_size(), BKE_image_tag_time(), BLI_thread_lock(), Image::colorspace_settings, ELEM, Image::filepath, Image::gen_color, Image::gen_depth, Image::gen_flag, Image::gen_type, Image::gen_x, Image::gen_y, IB_PERSISTENT, IB_rect, IB_rectfloat, IMA_GEN_FLOAT, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_TILED, IMA_SRC_VIEWER, IMA_TYPE_COMPOSITE, IMA_TYPE_IMAGE, IMA_TYPE_MULTILAYER, IMA_TYPE_R_RESULT, image_assign_ibuf(), image_get_cached_ibuf(), image_get_cached_ibuf_for_index_entry(), image_get_ibuf_multilayer(), image_get_render_result(), image_load_image_file(), image_load_movie_file(), image_load_sequence_multilayer(), image_quick_test(), IMB_allocImBuf(), ImBuf::index, LOCK_VIEWER, Image::source, Image::type, and ImBuf::userflags.
Referenced by BKE_image_acquire_ibuf(), and BKE_image_has_ibuf().
Definition at line 3762 of file source/blender/blenkernel/intern/image.cc.
References BLI_addhead(), BLI_addtail(), BLI_findstring(), BLI_insertlinkafter(), ImageView::filepath, MEM_mallocN, ImageView::name, STEREO_LEFT_NAME, STEREO_RIGHT_NAME, STREQ, STRNCPY, and Image::views.
Referenced by BKE_image_add_generated(), image_update_views_format(), and image_viewer_create_views().
Definition at line 660 of file source/blender/blenkernel/intern/image.cc.
References BKE_libblock_alloc(), ID_IM, image_init(), ImBuf::name, and type.
Referenced by BKE_image_add_from_imbuf(), BKE_image_add_generated(), BKE_image_ensure_viewer(), and BKE_image_load().
Definition at line 691 of file source/blender/blenkernel/intern/image.cc.
References IMA_MAKE_INDEX, IMA_NO_INDEX, imagecache_put(), and ImBuf::index.
Referenced by BKE_image_add_generated(), BKE_image_fill_tile(), BKE_image_reassign_tile(), BKE_image_replace_imbuf(), image_acquire_ibuf(), image_get_ibuf_multilayer(), image_get_render_result(), image_load_image_file(), image_load_movie_file(), and image_load_sequence_multilayer().
|
static |
Definition at line 378 of file source/blender/blenkernel/intern/image.cc.
References Image::anims, BKE_packedfile_blend_read(), BKE_previewimg_blend_read(), BLI_listbase_clear(), BLO_read_data_address, BLO_read_data_is_undo(), BLO_read_list(), ListBase::first, Image::gpuflag, image_runtime_reset(), Image::last_render_slot, Image::lastused, LISTBASE_FOREACH, Image::packedfiles, Image::preview, Image::render_slot, Image::renderslots, Image::stereo3d_format, Image::tiles, and Image::views.
Referenced by get_type_info().
|
static |
Definition at line 413 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_buffers(), and Image::cache.
Referenced by get_type_info().
|
static |
Definition at line 318 of file source/blender/blenkernel/intern/image.cc.
References Image::anims, BKE_id_blend_write(), BKE_packedfile_blend_write(), BKE_previewimg_blend_write(), BLI_assert, BLI_listbase_clear(), BLO_write_id_struct, BLO_write_is_undo(), BLO_write_struct, BLO_write_struct_list, Image::cache, ListBase::first, Image::gpuflag, Image::gputexture, Image::id, ID_IS_OVERRIDE_LIBRARY, Image::lastused, LISTBASE_FOREACH, ImagePackedFile::next, ImagePackedFile::packedfile, Image::packedfiles, Image_Runtime::partial_update_register, Image_Runtime::partial_update_user, Image::preview, Image::renderslots, Image::runtime, Image::stereo3d_format, Image::tiles, and Image::views.
Referenced by get_type_info().
Definition at line 1027 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_buf_fill_checker(), BKE_image_buf_fill_checker_color(), BKE_image_buf_fill_color(), ImageFillData::fill_color, ImageFillData::gen_type, ImageFillData::height, height, IMA_GENTYPE_GRID, IMA_GENTYPE_GRID_COLOR, ImageFillData::rect, ImageFillData::rect_float, ImageFillData::width, and width.
Referenced by add_ibuf_size().
Definition at line 1188 of file source/blender/blenkernel/intern/image.cc.
References COLOR_ROLE_DEFAULT_BYTE, COLOR_ROLE_DEFAULT_FLOAT, ImBuf::float_colorspace, image(), IMB_colormanagement_colorspace_get_name(), IMB_colormanagement_role_colorspace_name_get(), NULL, ImBuf::rect, ImBuf::rect_colorspace, ImBuf::rect_float, and STRNCPY.
Referenced by BKE_image_replace_imbuf().
|
static |
Definition at line 156 of file source/blender/blenkernel/intern/image.cc.
References Image::anims, BKE_color_managed_colorspace_settings_copy(), BKE_previewimg_id_copy(), BLI_duplicatelist(), BLI_listbase_clear(), Image::cache, Image::colorspace_settings, copy_image_packedfiles(), Image::gputexture, Image::id, image_runtime_reset_on_copy(), LIB_ID_COPY_NO_PREVIEW, LISTBASE_FOREACH, MEM_dupallocN, Image::packedfiles, Image::preview, Image::renderslots, Image::rr, Image::stereo3d_format, TEXTARGET_COUNT, Image::tiles, and Image::views.
Referenced by get_type_info().
|
static |
Definition at line 4965 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_animated(), BKE_image_user_frame_calc(), ImageUser::flag, IMA_ANIM_ALWAYS, and IMA_NEED_FRAME_RECALC.
Referenced by BKE_image_editors_update_frame().
|
static |
Definition at line 227 of file source/blender/blenkernel/intern/image.cc.
References Freestyle::a, BLI_ghashutil_strhash_p(), IDCacheKey::id_session_uuid, image(), LISTBASE_FOREACH, IDCacheKey::offset_in_ID, TEXTARGET_COUNT, and user_data.
Referenced by get_type_info().
|
static |
Definition at line 264 of file source/blender/blenkernel/intern/image.cc.
References BKE_bpath_foreach_path_fixed_process(), BKE_BPATH_FOREACH_PATH_RELOAD_EDITED, BKE_BPATH_FOREACH_PATH_RESOLVE_TOKEN, BKE_BPATH_FOREACH_PATH_SKIP_PACKED, BKE_image_get_tile_strformat(), BKE_image_has_packedfile(), BKE_image_is_dirty(), BKE_image_set_filepath_from_tile_number(), BKE_image_signal(), BLI_join_dirfile(), BLI_split_dir_part(), BLI_split_file_part(), BLI_strncpy(), BPathForeachPathData::bmain, ELEM, FILE_MAX, FILE_MAXDIR, FILE_MAXFILE, Image::filepath, ListBase::first, BPathForeachPathData::flag, IMA_SIGNAL_RELOAD, IMA_SRC_FILE, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_TILED, MEM_SAFE_FREE, result, Image::source, and Image::tiles.
Referenced by get_type_info().
Definition at line 586 of file source/blender/blenkernel/intern/image.cc.
References ImageAnim::anim, Image::anims, BLI_remlink(), IMB_free_anim(), ListBase::last, and MEM_freeN.
Referenced by BKE_image_free_buffers_ex(), and image_load_movie_file().
Definition at line 556 of file source/blender/blenkernel/intern/image.cc.
References image(), and IMB_moviecache_free().
Referenced by BKE_image_ensure_viewer_views(), BKE_image_free_buffers_ex(), and image_load_sequence_multilayer().
Definition at line 199 of file source/blender/blenkernel/intern/image.cc.
References BKE_icon_id_delete(), BKE_image_free_buffers(), BKE_image_free_views(), BKE_previewimg_free(), BLI_freelistN(), image(), image_free_packedfiles(), image_runtime_free_data(), LISTBASE_FOREACH, MEM_SAFE_FREE, and RE_FreeRenderResult().
Referenced by BKE_image_free_data(), and get_type_info().
Definition at line 564 of file source/blender/blenkernel/intern/image.cc.
References BKE_packedfile_free(), BLI_remlink(), ListBase::last, MEM_freeN, ImagePackedFile::packedfile, and Image::packedfiles.
Referenced by BKE_image_free_packedfiles(), BKE_image_memorypack(), BKE_image_signal(), image_free_data(), image_load_image_file(), and image_memorypack_imbuf().
Definition at line 2953 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_multiview(), BKE_image_partial_update_mark_full_update(), BLI_listbase_count(), ELEM, ListBase::first, GPU_texture_free(), Image::gputexture, image_remove_ibuf(), TEXTARGET_2D_ARRAY, TEXTARGET_COUNT, TEXTARGET_TILE_MAPPING, tile, Image::tiles, and Image::views.
Referenced by BKE_image_fill_tile(), BKE_image_remove_tile(), and BKE_image_signal().
|
static |
Definition at line 4472 of file source/blender/blenkernel/intern/image.cc.
References ELEM, ImageUser::framenr, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_TILED, IMA_SRC_VIEWER, IMA_TYPE_IMAGE, IMA_TYPE_MULTILAYER, image_get_cached_ibuf_for_index_entry(), image_get_multiview_index(), image_get_tile_number_from_iuser(), ImBuf::index, Image::lastframe, Image::source, and Image::type.
Referenced by BKE_image_has_ibuf(), and image_acquire_ibuf().
|
static |
Get the ibuf from an image cache by its index and entry. Local use here only.
Definition at line 679 of file source/blender/blenkernel/intern/image.cc.
References IMA_MAKE_INDEX, IMA_NO_INDEX, imagecache_get(), and ImBuf::index.
Referenced by BKE_image_memorypack(), BKE_image_reassign_tile(), BKE_image_signal(), image_acquire_ibuf(), image_get_cached_ibuf(), and image_get_render_result().
|
static |
Definition at line 4442 of file source/blender/blenkernel/intern/image.cc.
References ImageUser::framenr, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_TILED, IMA_TYPE_IMAGE, IMA_TYPE_MULTILAYER, image_get_multiview_index(), image_get_tile_number_from_iuser(), ImBuf::index, Image::lastframe, Image::source, and Image::type.
Referenced by BKE_image_pool_acquire_ibuf().
Definition at line 4195 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_multilayer_index(), BKE_imbuf_stamp_info(), ImBuf::channels, RenderPass::channels, ImBuf::flags, IB_rectfloat, IMA_NO_INDEX, IMA_TYPE_IMAGE, image_assign_ibuf(), image_init_after_load(), image_load_image_file(), IMB_allocImBuf(), ImageUser::multi_index, RenderPass::rect, ImBuf::rect_float, RenderResult::rectx, RenderResult::recty, Image::rr, and Image::type.
Referenced by image_acquire_ibuf().
Definition at line 4419 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_has_multiple_ibufs(), BKE_image_is_multilayer(), BKE_image_is_multiview(), BKE_image_is_stereo(), Image::eye, IMA_NO_INDEX, IMA_SRC_VIEWER, IMA_TYPE_COMPOSITE, ImBuf::index, ImageUser::multi_index, Image::source, and Image::type.
Referenced by image_get_cached_ibuf(), and image_get_entry_and_index().
Definition at line 4230 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_renderslot(), BKE_image_is_stereo(), BKE_imbuf_stamp_info(), BLI_findlink(), BLI_thread_lock(), BLI_thread_unlock(), ImBuf::channels, channels(), RenderPass::channels, COLOR_ROLE_DEFAULT_BYTE, ImBuf::dither, RenderData::dither_intensity, ListBase::first, ImageUser::flag, ImBuf::flags, IB_DISPLAY_BUFFER_INVALID, IB_rect, IB_rectfloat, IB_zbuffloat, IMA_NO_INDEX, IMA_SHOW_STEREO, image_assign_ibuf(), image_get_cached_ibuf_for_index_entry(), image_render_pass_get(), IMB_allocImBuf(), IMB_colormanagement_assign_rect_colorspace(), IMB_colormanagement_role_colorspace_name_get(), imb_freerectImBuf(), IMB_metadata_free(), Image::last_render_slot, ImageUser::layer, LOCK_COLORMANAGE, LOCK_VIEWER, ImBuf::mall, ImBuf::metadata, ImageUser::multiview_eye, RenderPass::name, RenderPass::next, ImageUser::pass, RenderLayer::passes, Scene::r, RE_AcquireResultImage(), RE_GetSceneRender(), RE_PASSNAME_Z, RE_ReleaseResultImage(), ImBuf::rect, RenderPass::rect, RenderView::rect32, ImBuf::rect_float, RenderView::rectf, RenderView::rectz, RenderSlot::render, Image::render_slot, ImageUser::scene, STREQ, ImBuf::userflags, ImageUser::view, RenderPass::view_id, ImBuf::x, ImBuf::y, and ImBuf::zbuf_float.
Referenced by image_acquire_ibuf().
Definition at line 788 of file source/blender/blenkernel/intern/image.cc.
References BLI_assert, ListBase::first, tile, ImageUser::tile, and Image::tiles.
Referenced by BKE_image_get_tile_from_iuser(), BKE_image_user_file_path_ex(), image_get_cached_ibuf(), image_get_entry_and_index(), and load_image_single().
Definition at line 631 of file source/blender/blenkernel/intern/image.cc.
References BKE_color_managed_colorspace_settings_init(), BKE_image_add_renderslot(), BLI_addtail(), BLI_assert, Image::colorspace_settings, DNA_struct_default_get, Image::flag, IMA_SRC_VIEWER, IMA_TYPE_R_RESULT, IMA_VIEW_AS_RENDER, image_runtime_reset(), MEMCMP_STRUCT_AFTER_IS_ZERO, MEMCPY_STRUCT_AFTER, Image::source, Image::stereo3d_format, tile, Image::tiles, type, and Image::type.
Referenced by image_alloc(), image_init_data(), paint_2d_bucket_fill(), and paint_2d_gradient_fill().
Common stuff to do with images after loading.
Definition at line 3820 of file source/blender/blenkernel/intern/image.cc.
References BKE_icon_changed(), BKE_icon_id_ensure(), BKE_image_get_tile_from_iuser(), BKE_image_tag_time(), BLI_assert, BLI_thread_is_main(), G, Image::id, Image::preview, tile, and UNUSED_VARS_NDEBUG.
Referenced by image_get_ibuf_multilayer(), image_load_sequence_multilayer(), load_image_single(), and load_movie_single().
Definition at line 906 of file source/blender/blenkernel/intern/image.cc.
References Image::alpha_mode, BKE_image_user_file_path(), Image::colorspace_settings, FILE_MAX, ImBuf::flags, IB_alphamode_channel_packed, IB_alphamode_detect, IB_alphamode_ignore, IB_alphamode_premul, IB_test, IMA_ALPHA_CHANNEL_PACKED, IMA_ALPHA_IGNORE, IMA_ALPHA_PREMUL, IMA_ALPHA_STRAIGHT, IMB_freeImBuf(), IMB_loadiffname(), and ColorManagedColorspaceSettings::name.
Referenced by BKE_image_load().
Definition at line 147 of file source/blender/blenkernel/intern/image.cc.
References IMA_SRC_GENERATED, IMA_TYPE_UV_TEST, image(), and image_init().
Referenced by get_type_info().
|
static |
Definition at line 3644 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_views(), BLI_addtail(), BLI_listbase_count(), ListBase::first, LISTBASE_FOREACH, ImageView::name, RenderView::name, ImageView::next, RenderView::next, STREQ, STRNCPY, Image::views, and RenderResult::views.
Referenced by BKE_image_acquire_renderresult().
|
static |
Definition at line 4125 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_buffers(), BKE_image_has_packedfile(), BKE_image_is_multiview(), BKE_image_is_stereo(), BLI_assert, BLI_listbase_count(), BLI_listbase_count_at_most(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), IMA_NO_INDEX, IMA_SRC_TILED, image_assign_ibuf(), image_free_packedfiles(), image_num_viewfiles(), IMB_freeImBuf(), IMB_ImBufFromStereo3d(), ImBuf::index, load_image_single(), ImageUser::multi_index, Image::packedfiles, R_IMF_VIEWS_STEREO_3D, Image::source, Image::stereo3d_format, Image::tiles, Image::views, and Image::views_format.
Referenced by image_acquire_ibuf(), image_get_ibuf_multilayer(), and image_load_sequence_multilayer().
Definition at line 3973 of file source/blender/blenkernel/intern/image.cc.
References Image::anims, BKE_image_is_multiview(), BKE_image_is_stereo(), BLI_addtail(), BLI_listbase_count(), BLI_listbase_count_at_most(), blender::Array< T, InlineBufferCapacity, Allocator >::data(), image_assign_ibuf(), image_free_anims(), image_num_viewfiles(), IMB_freeImBuf(), IMB_ImBufFromStereo3d(), load_movie_single(), ImageUser::multi_index, R_IMF_VIEWS_STEREO_3D, Image::stereo3d_format, Image::views, and Image::views_format.
Referenced by image_acquire_ibuf().
|
static |
Definition at line 3872 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_multilayer_index(), BKE_imbuf_stamp_info(), ImBuf::channels, RenderPass::channels, ImBuf::flags, RenderResult::framenr, IB_rectfloat, IMA_TYPE_IMAGE, image_assign_ibuf(), image_free_cached_frames(), image_init_after_load(), image_load_image_file(), IMB_allocImBuf(), ImBuf::mall, MEM_dupallocN, ImageUser::multi_index, RE_FreeRenderResult(), RenderPass::rect, ImBuf::rect_float, RenderResult::rectx, RenderResult::recty, Image::rr, and Image::type.
Referenced by image_acquire_ibuf().
Definition at line 1416 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_lock(), BLI_mutex_unlock(), IMA_SRC_VIEWER, image(), IMB_MIPMAP_LEVELS, IMB_moviecacheIter_done(), IMB_moviecacheIter_free(), IMB_moviecacheIter_getImBuf(), IMB_moviecacheIter_new(), IMB_moviecacheIter_step(), MEM_allocN_len, ImBuf::mipmap, ImBuf::rect, ImBuf::rect_float, and size().
Referenced by BKE_image_free_all_textures(), and BKE_image_print_memlist().
|
static |
Pack image buffer to memory as PNG or EXR.
Definition at line 1266 of file source/blender/blenkernel/intern/image.cc.
References BLI_addtail(), CLOG_STR_ERROR, ImBuf::encodedbuffer, ImBuf::encodedsize, ImagePackedFile::filepath, ImBuf::ftype, IB_BITMAPDIRTY, IB_mem, IB_rect, image_free_packedfiles(), IMB_freeImBuf(), IMB_FTYPE_OPENEXR, IMB_FTYPE_PNG, IMB_saveiff(), LOG, MEM_mallocN, ImagePackedFile::packedfile, Image::packedfiles, pf, ImBuf::rect_float, STRNCPY, ImagePackedFile::tile_number, ImBuf::userflags, view, and ImagePackedFile::view.
Referenced by BKE_image_memorypack().
|
static |
Definition at line 3857 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_multiview(), BLI_listbase_count(), R_IMF_VIEWS_STEREO_3D, Image::views, and Image::views_format.
Referenced by BKE_image_memorypack(), BKE_image_packfiles(), BKE_image_packfiles_from_mem(), BKE_image_signal(), image_load_image_file(), and image_load_movie_file().
BLI_INLINE ImBuf* image_pool_find_item | ( | ImagePool * | pool, |
Image * | image, | ||
int | entry, | ||
int | index, | ||
bool * | found | ||
) |
Definition at line 4784 of file source/blender/blenkernel/intern/image.cc.
References ImagePoolItem::entry, ImagePoolItem::ibuf, ImagePoolItem::image, image(), ImagePoolItem::index, ImagePoolItem::next, and blender::compositor::pool.
Referenced by BKE_image_pool_acquire_ibuf().
BLI_INLINE bool image_quick_test | ( | Image * | ima, |
const ImageUser * | iuser | ||
) |
Definition at line 4529 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_get_tile_from_iuser(), and tile.
Referenced by BKE_image_has_ibuf(), BKE_image_pool_acquire_ibuf(), and image_acquire_ibuf().
Definition at line 700 of file source/blender/blenkernel/intern/image.cc.
References IMA_MAKE_INDEX, IMA_NO_INDEX, imagecache_remove(), and ImBuf::index.
Referenced by BKE_image_reassign_tile(), and image_free_tile().
|
static |
Definition at line 3158 of file source/blender/blenkernel/intern/image.cc.
References ListBase::first, RenderPass::name, RenderPass::next, RenderLayer::passes, STREQ, view, and RenderPass::view_id.
Referenced by BKE_image_multilayer_index(), and image_get_render_result().
Definition at line 134 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_partial_update_free(), BKE_image_partial_update_register_free(), BLI_mutex_end(), image(), and MEM_freeN.
Referenced by image_free_data().
Reset runtime image fields when data-block is being initialized.
Definition at line 117 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_init(), image(), and MEM_mallocN.
Referenced by image_blend_read_data(), and image_init().
Reset runtime image fields when data-block is being copied.
Definition at line 125 of file source/blender/blenkernel/intern/image.cc.
References BLI_mutex_init(), image(), and MEM_mallocN.
Referenced by image_copy_data().
|
static |
Definition at line 2904 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_animated(), DEG_id_tag_update(), ImageUser::flag, ID_RECALC_COPY_ON_WRITE, and IMA_NEED_FRAME_RECALC.
Referenced by BKE_image_signal().
|
static |
Definition at line 2918 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_partial_update_mark_full_update(), DEG_id_tag_update(), ID_RECALC_COPY_ON_WRITE, image_update_views_format(), and ImageUser::scene.
Referenced by BKE_image_signal().
Definition at line 5373 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_free_views(), BKE_image_is_multiview(), BKE_scene_multiview_is_render_view_active(), BKE_scene_multiview_view_prefix_get(), BLI_open(), BLI_path_abs(), BLI_remlink(), file, FILE_MAX, ImageView::filepath, Image::filepath, ListBase::first, Image::flag, Image::id, ID_BLEND_PATH_FROM_GLOBAL, IMA_USE_VIEWS, image_add_view(), ListBase::last, MEM_freeN, SceneRenderView::name, names, SceneRenderView::next, O_BINARY, ImageView::prev, Scene::r, R_IMF_VIEWS_STEREO_3D, R_MULTIVIEW, RenderData::scemode, scene, ImageUser::scene, SNPRINTF, STEREO_LEFT_NAME, STEREO_RIGHT_NAME, str, STRNCPY, SceneRenderView::suffix, Image::views, RenderData::views, and Image::views_format.
Referenced by BKE_image_signal(), and image_tag_reload().
|
static |
Definition at line 5007 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_animated(), BKE_image_user_frame_calc(), DAG_EVAL_RENDER, DEG_get_ctime(), DEG_get_mode(), depsgraph, ImageUser::flag, IMA_ANIM_ALWAYS, and IMA_NEED_FRAME_RECALC.
Referenced by BKE_image_user_id_eval_animation().
|
static |
Definition at line 4987 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_is_animated().
Referenced by BKE_image_user_id_has_animation().
|
static |
Definition at line 2642 of file source/blender/blenkernel/intern/image.cc.
References BKE_scene_multiview_is_render_view_active(), ListBase::first, image_add_view(), SceneRenderView::next, R_MULTIVIEW, RenderData::scemode, and RenderData::views.
Referenced by BKE_image_ensure_viewer_views().
|
static |
Definition at line 2746 of file source/blender/blenkernel/intern/image.cc.
References callback, GPU_material_textures(), LISTBASE_FOREACH, and textures.
Referenced by image_walk_id_all_users().
|
static |
Definition at line 2763 of file source/blender/blenkernel/intern/image.cc.
References blender::compositor::area(), bScreen::areabase, Camera::bg_images, BKE_workspace_active_screen_get(), callback, Object::data, Object::empty_drawtype, Material::gpumaterial, World::gpumaterial, GS, id, Light::id, Material::id, bNodeTree::id, Object::id, Scene::id, Simulation::id, Tex::id, World::id, ID_CA, ID_LA, ID_MA, ID_NT, ID_OB, ID_SCE, ID_SIM, ID_TE, ID_WM, ID_WO, Tex::ima, SpaceImage::image, image_walk_gpu_materials(), image_walk_ntree_all_users(), Object::iuser, SpaceImage::iuser, Tex::iuser, LISTBASE_FOREACH, ID::name, Light::nodetree, Material::nodetree, Scene::nodetree, Simulation::nodetree, Tex::nodetree, World::nodetree, ntree, OB_EMPTY_IMAGE, scene, simulation, SPACE_IMAGE, tex, TEX_IMAGE, Tex::type, Light::use_nodes, Material::use_nodes, Scene::use_nodes, Tex::use_nodes, World::use_nodes, wmWindowManager::windows, and world.
Referenced by BKE_image_editors_update_frame(), BKE_image_user_id_eval_animation(), BKE_image_user_id_has_animation(), and BKE_image_walk_all_users().
|
static |
Definition at line 2702 of file source/blender/blenkernel/intern/image.cc.
References callback, CMP_NODE_IMAGE, Tex::iuser, LISTBASE_FOREACH, node, bNodeTree::nodes, ntree, NTREE_COMPOSIT, NTREE_SHADER, NTREE_TEXTURE, SH_NODE_TEX_ENVIRONMENT, SH_NODE_TEX_IMAGE, tex, TEX_NODE_IMAGE, and bNodeTree::type.
Referenced by image_walk_id_all_users().
|
static |
Definition at line 1488 of file source/blender/blenkernel/intern/image.cc.
References IB_BITMAPDIRTY, and ImBuf::userflags.
Referenced by BKE_image_free_all_textures().
|
static |
Definition at line 1537 of file source/blender/blenkernel/intern/image.cc.
References IB_BITMAPDIRTY, IMA_INDEX_ENTRY, IMA_NO_INDEX, ImBuf::index, and ImBuf::userflags.
Referenced by BKE_image_free_anim_ibufs().
Definition at line 539 of file source/blender/blenkernel/intern/image.cc.
References image(), IMB_moviecache_get(), ImageCacheKey::index, and ImBuf::index.
Referenced by image_get_cached_ibuf_for_index_entry().
Definition at line 493 of file source/blender/blenkernel/intern/image.cc.
References Freestyle::a, and usdtokens::b().
Referenced by imagecache_put().
|
static |
Definition at line 487 of file source/blender/blenkernel/intern/image.cc.
References ImageCacheKey::index.
Referenced by imagecache_put().
|
static |
Definition at line 501 of file source/blender/blenkernel/intern/image.cc.
References IMA_INDEX_ENTRY, IMB_PROXY_NONE, and ImageCacheKey::index.
Referenced by imagecache_put().
Definition at line 510 of file source/blender/blenkernel/intern/image.cc.
References image(), imagecache_hashcmp(), imagecache_hashhash(), imagecache_keydata(), IMB_moviecache_create(), IMB_moviecache_put(), IMB_moviecache_set_getdata_callback(), and ImageCacheKey::index.
Referenced by BKE_image_merge(), and image_assign_ibuf().
Definition at line 528 of file source/blender/blenkernel/intern/image.cc.
References image(), IMB_moviecache_remove(), and ImageCacheKey::index.
Referenced by image_remove_ibuf().
|
static |
Definition at line 3838 of file source/blender/blenkernel/intern/image.cc.
References Image::alpha_mode, IB_alphamode_channel_packed, IB_alphamode_ignore, IB_alphamode_premul, IMA_ALPHA_CHANNEL_PACKED, IMA_ALPHA_IGNORE, IMA_ALPHA_PREMUL, and IMA_ALPHA_STRAIGHT.
Referenced by load_image_single().
|
static |
Definition at line 4023 of file source/blender/blenkernel/intern/image.cc.
References BKE_image_user_file_path(), BKE_image_user_frame_calc(), BKE_packedfile_new(), BLI_addtail(), Image::colorspace_settings, FILE_MAX, ImagePackedFile::filepath, ImageUser::framenr, ImBuf::ftype, G, G_FILE_AUTOPACK, IB_metadata, IB_multilayer, IB_rect, Image::id, ID_BLEND_PATH_FROM_GLOBAL, IMA_SRC_TILED, IMA_TYPE_MULTILAYER, image_get_tile_number_from_iuser(), image_init_after_load(), IMB_exr_has_multilayer(), IMB_freeImBuf(), IMB_FTYPE_OPENEXR, IMB_ibImageFromMemory(), IMB_loadiffname(), imbuf_alpha_flags_for_image(), Image::lastframe, LISTBASE_FOREACH, MEM_mallocN, ColorManagedColorspaceSettings::name, ImagePackedFile::packedfile, Image::packedfiles, Image::source, STRNCPY, ImagePackedFile::tile_number, Image::type, ImBuf::userdata, and ImagePackedFile::view.
Referenced by image_load_image_file().
|
static |
Definition at line 3920 of file source/blender/blenkernel/intern/image.cc.
References ImageAnim::anim, Image::anims, BKE_image_user_file_path(), BLI_findlink(), Image::colorspace_settings, FILE_MAX, Image::flag, ImBuf::flags, ImageUser::frames, IB_animdeinterlace, IB_rect, IMA_DEINTERLACE, image_init_after_load(), IMB_anim_absolute(), IMB_anim_get_duration(), IMB_makeSingleUser(), IMB_PROXY_NONE, IMB_TC_RECORD_RUN, ColorManagedColorspaceSettings::name, openanim(), str, and ImageUser::view.
Referenced by image_load_movie_file().
|
static |
Definition at line 2463 of file source/blender/blenkernel/intern/image.cc.
References BKE_render_result_stamp_data(), and BKE_stamp_is_known_field().
Referenced by BKE_stamp_info_from_imbuf().
|
static |
Definition at line 2449 of file source/blender/blenkernel/intern/image.cc.
References data, IMB_metadata_get_field(), len, and ImBuf::metadata.
Referenced by BKE_stamp_info_from_imbuf().
|
static |
Definition at line 2442 of file source/blender/blenkernel/intern/image.cc.
References data, IMB_metadata_set_field(), and ImBuf::metadata.
Referenced by BKE_imbuf_stamp_info().
struct anim* openanim | ( | const char * | name, |
int | flags, | ||
int | streamindex, | ||
char | colorspace[IMA_MAX_SPACE] | ||
) |
Used by sequencer too.
Definition at line 2568 of file source/blender/blenkernel/intern/image.cc.
References BLI_exists(), ImBuf::flags, IMB_anim_absolute(), IMB_free_anim(), IMB_freeImBuf(), IMB_open_anim(), IMB_PROXY_NONE, IMB_TC_NONE, and ImBuf::name.
Referenced by load_movie_single(), movieclip_open_anim_file(), prefetch_data_fn(), SEQ_add_movie_strip(), SEQ_add_reload_new_file(), seq_open_anim_file(), seq_proxy_fetch(), and seq_render_movie_strip_custom_file_proxy().
struct anim* openanim_noload | ( | const char * | name, |
int | flags, | ||
int | streamindex, | ||
char | colorspace[IMA_MAX_SPACE] | ||
) |
Definition at line 2557 of file source/blender/blenkernel/intern/image.cc.
References anim::colorspace, IMB_open_anim(), anim::name, and anim::streamindex.
Referenced by seq_open_anim_file().
|
static |
do_prefix | Include a label like "File ", "Date ", etc. in the stamp data strings. |
use_dynamic | Also include data that can change on a per-frame basis. |
Definition at line 1614 of file source/blender/blenkernel/intern/image.cc.
References BKE_main_blendfile_path_from_global(), BKE_scene_find_last_marker_name(), BLI_hostname_get(), BLI_timecode_string_from_time(), BLI_timecode_string_from_time_simple(), StampData::camera, camera, StampData::cameralens, RenderData::cfra, StampData::date, RenderData::efra, StampData::file, FPS, FRA2TIME, StampData::frame, StampData::frame_range, StampData::hostname, Scene::id, integer_digits_i(), RenderStats::lastframetime, StampData::marker, RenderStats::mem_peak, StampData::memory, Sequence::name, ID::name, StampData::note, OB_CAMERA, Scene::r, R_STAMP_CAMERA, R_STAMP_CAMERALENS, R_STAMP_DATE, R_STAMP_FILENAME, R_STAMP_FRAME, R_STAMP_FRAME_RANGE, R_STAMP_HOSTNAME, R_STAMP_MARKER, R_STAMP_MEMORY, R_STAMP_NOTE, R_STAMP_RENDERTIME, R_STAMP_SCENE, R_STAMP_SEQSTRIP, R_STAMP_TIME, RE_GetSceneRender(), RE_GetStats(), StampData::rendertime, StampData::scene, scene, SEQ_get_topmost_sequence(), RenderData::sfra, SNPRINTF, RenderData::stamp, RenderData::stamp_udata, StampData::strip, STRNCPY, t, StampData::time, time, and USER_TIMECODE_SMPTE_FULL.
Referenced by BKE_image_stamp_buf(), BKE_render_result_stamp_info(), and BKE_stamp_info_from_scene_static().
|
static |
Definition at line 1793 of file source/blender/blenkernel/intern/image.cc.
References StampData::camera, StampData::cameralens, StampData::date, StampData::file, StampData::frame, StampData::frame_range, StampData::hostname, StampData::marker, StampData::memory, StampData::note, Scene::r, R_STAMP_CAMERA, R_STAMP_CAMERALENS, R_STAMP_DATE, R_STAMP_FILENAME, R_STAMP_FRAME, R_STAMP_FRAME_RANGE, R_STAMP_HOSTNAME, R_STAMP_MARKER, R_STAMP_MEMORY, R_STAMP_NOTE, R_STAMP_RENDERTIME, R_STAMP_SCENE, R_STAMP_SEQSTRIP, R_STAMP_TIME, StampData::rendertime, StampData::scene, scene, SNPRINTF, RenderData::stamp, StampData::strip, STRNCPY, and StampData::time.
Referenced by BKE_image_stamp_buf().
Definition at line 3381 of file source/blender/blenkernel/intern/image.cc.
References Freestyle::a, usdtokens::b(), and ImageTile::tile_number.
Referenced by BKE_image_sort_tiles().
IDTypeInfo IDType_ID_IM = get_type_info() |
Definition at line 457 of file source/blender/blenkernel/intern/image.cc.
|
static |
Definition at line 106 of file source/blender/blenkernel/intern/image.cc.
Referenced by image_memorypack_imbuf().
|
static |
Definition at line 2328 of file source/blender/blenkernel/intern/image.cc.
Referenced by BKE_stamp_is_known_field().