|
Blender
V2.59
|
#include <stdio.h>#include <string.h>#include <fcntl.h>#include <math.h>#include <unistd.h>#include <time.h>#include "MEM_guardedalloc.h"#include "IMB_imbuf_types.h"#include "IMB_imbuf.h"#include "DNA_packedFile_types.h"#include "DNA_scene_types.h"#include "DNA_object_types.h"#include "DNA_camera_types.h"#include "DNA_sequence_types.h"#include "DNA_userdef_types.h"#include "BLI_blenlib.h"#include "BLI_threads.h"#include "BLI_utildefines.h"#include "BKE_bmfont.h"#include "BKE_global.h"#include "BKE_icons.h"#include "BKE_image.h"#include "BKE_library.h"#include "BKE_main.h"#include "BKE_packedFile.h"#include "BKE_scene.h"#include "BKE_node.h"#include "BKE_sequencer.h"#include "BKE_utildefines.h"#include "BLF_api.h"#include "PIL_time.h"#include "RE_pipeline.h"#include "GPU_draw.h"#include "BLO_sys_types.h"Go to the source code of this file.
Classes | |
| struct | StampData |
Defines | |
| #define | IMA_NO_INDEX 0x7FEFEFEF |
| #define | IMA_MAKE_INDEX(frame, index) ((frame)<<10)+index |
| #define | IMA_INDEX_FRAME(index) (index>>10) |
| #define | IMA_INDEX_PASS(index) (index & ~1023) |
| #define | BUFF_MARGIN_X 2 |
| #define | BUFF_MARGIN_Y 1 |
Typedefs | |
| typedef struct StampData | StampData |
Functions | |
| static void | de_interlace_ng (struct ImBuf *ibuf) |
| static void | de_interlace_st (struct ImBuf *ibuf) |
| void | image_de_interlace (Image *ima, int odd) |
| static void | image_free_buffers (Image *ima) |
| void | free_image (Image *ima) |
| static Image * | image_alloc (const char *name, short source, short type) |
| static ImBuf * | image_get_ibuf (Image *ima, int index, int frame) |
| static void | image_remove_ibuf (Image *ima, ImBuf *ibuf) |
| static void | image_assign_ibuf (Image *ima, ImBuf *ibuf, int index, int frame) |
| Image * | copy_image (Image *ima) |
| void | BKE_image_merge (Image *dest, Image *source) |
| Image * | BKE_add_image_file (const char *name) |
| static ImBuf * | add_ibuf_size (unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short uvtestgrid, float color[4]) |
| Image * | BKE_add_image_size (unsigned int width, unsigned int height, const char *name, int depth, int floatbuf, short uvtestgrid, float color[4]) |
| Image * | BKE_add_image_imbuf (ImBuf *ibuf) |
| void | BKE_image_memorypack (Image *ima) |
| void | tag_image_time (Image *ima) |
| void | free_old_images (void) |
| static uintptr_t | image_mem_size (Image *ima) |
| void | BKE_image_print_memlist (void) |
| void | BKE_image_free_all_textures (void) |
| void | BKE_image_free_anim_ibufs (Image *ima, int except_frame) |
| void | BKE_image_all_free_anim_ibufs (int cfra) |
| int | BKE_imtype_to_ftype (int imtype) |
| int | BKE_ftype_to_imtype (int ftype) |
| int | BKE_imtype_is_movie (int imtype) |
| int | BKE_add_image_extension (char *string, int imtype) |
| static void | stampdata (Scene *scene, Object *camera, StampData *stamp_data, int do_prefix) |
| void | BKE_stamp_buf (Scene *scene, Object *camera, unsigned char *rect, float *rectf, int width, int height, int channels) |
| void | BKE_stamp_info (Scene *scene, Object *camera, struct ImBuf *ibuf) |
| int | BKE_alphatest_ibuf (ImBuf *ibuf) |
| int | BKE_write_ibuf (ImBuf *ibuf, const char *name, int imtype, int subimtype, int quality) |
| int | BKE_write_ibuf_stamp (Scene *scene, struct Object *camera, ImBuf *ibuf, const char *name, int imtype, int subimtype, int quality) |
| void | BKE_makepicstring (char *string, const char *base, int frame, int imtype, const short use_ext, const short use_frames) |
| struct anim * | openanim (char *name, int flags) |
| Image * | BKE_image_verify_viewer (int type, const char *name) |
| void | BKE_image_assign_ibuf (Image *ima, ImBuf *ibuf) |
| void | BKE_image_signal (Image *ima, ImageUser *iuser, int signal) |
| RenderPass * | BKE_image_multilayer_index (RenderResult *rr, ImageUser *iuser) |
| RenderResult * | BKE_image_acquire_renderresult (Scene *scene, Image *ima) |
| void | BKE_image_release_renderresult (Scene *scene, Image *ima) |
| void | BKE_image_backup_render (Scene *scene, Image *ima) |
| static void | image_create_multilayer (Image *ima, ImBuf *ibuf, int framenr) |
| static void | image_initialize_after_load (Image *ima, ImBuf *ibuf) |
| static ImBuf * | image_load_sequence_file (Image *ima, ImageUser *iuser, int frame) |
| static ImBuf * | image_load_sequence_multilayer (Image *ima, ImageUser *iuser, int frame) |
| static ImBuf * | image_load_movie_file (Image *ima, ImageUser *iuser, int frame) |
| static ImBuf * | image_load_image_file (Image *ima, ImageUser *iuser, int cfra) |
| static ImBuf * | image_get_ibuf_multilayer (Image *ima, ImageUser *iuser) |
| static ImBuf * | image_get_render_result (Image *ima, ImageUser *iuser, void **lock_r) |
| static ImBuf * | image_get_ibuf_threadsafe (Image *ima, ImageUser *iuser, int *frame_r, int *index_r) |
| ImBuf * | BKE_image_acquire_ibuf (Image *ima, ImageUser *iuser, void **lock_r) |
| void | BKE_image_release_ibuf (Image *ima, void *lock) |
| ImBuf * | BKE_image_get_ibuf (Image *ima, ImageUser *iuser) |
| int | BKE_image_user_get_frame (const ImageUser *iuser, int cfra, int fieldnr) |
| void | BKE_image_user_calc_frame (ImageUser *iuser, int cfra, int fieldnr) |
Definition in file image.c.
| #define BUFF_MARGIN_X 2 |
Referenced by BKE_stamp_buf().
| #define BUFF_MARGIN_Y 1 |
Referenced by BKE_stamp_buf().
| #define IMA_INDEX_FRAME | ( | index | ) | (index>>10) |
Definition at line 98 of file image.c.
Referenced by BKE_image_free_anim_ibufs(), and BKE_image_merge().
| #define IMA_INDEX_PASS | ( | index | ) | (index & ~1023) |
Definition at line 99 of file image.c.
Referenced by BKE_image_merge().
| #define IMA_MAKE_INDEX | ( | frame, | |
| index | |||
| ) | ((frame)<<10)+index |
Definition at line 97 of file image.c.
Referenced by image_assign_ibuf(), and image_get_ibuf().
| #define IMA_NO_INDEX 0x7FEFEFEF |
Definition at line 94 of file image.c.
Referenced by BKE_add_image_imbuf(), BKE_add_image_size(), BKE_image_acquire_ibuf(), BKE_image_assign_ibuf(), BKE_image_free_anim_ibufs(), BKE_image_memorypack(), BKE_image_signal(), image_assign_ibuf(), image_get_ibuf(), image_get_ibuf_multilayer(), image_get_ibuf_threadsafe(), image_get_render_result(), and image_load_image_file().
| static ImBuf* add_ibuf_size | ( | unsigned int | width, |
| unsigned int | height, | ||
| const char * | name, | ||
| int | depth, | ||
| int | floatbuf, | ||
| short | uvtestgrid, | ||
| float | color[4] | ||
| ) | [static] |
Definition at line 390 of file image.c.
References BKE_image_buf_fill_checker(), BKE_image_buf_fill_checker_color(), BKE_image_buf_fill_color(), BLI_strncpy(), IB_BITMAPDIRTY, IB_rect, IB_rectfloat, IMB_allocImBuf(), ImBuf::name, NULL, ImBuf::rect, ImBuf::rect_float, and ImBuf::userflags.
Referenced by BKE_add_image_size(), and BKE_image_acquire_ibuf().
| int BKE_add_image_extension | ( | char * | string, |
| int | imtype | ||
| ) |
Definition at line 775 of file image.c.
References BLI_replace_extension(), BLI_testextensie(), BLI_testextensie_array(), ELEM, ELEM5, FALSE, FILE_MAX, G, Global::have_quicktime, imb_ext_image, imb_ext_image_qt, NULL, R_BMP, R_CINEON, R_DDS, R_DPX, R_FFMPEG, R_H264, R_IRIS, R_IRIZ, R_JP2, R_MULTILAYER, R_OPENEXR, R_PNG, R_RADHDR, R_RAWTGA, R_TARGA, R_THEORA, R_TIFF, R_XVID, and TRUE.
Referenced by BKE_makepicstring(), BL_MakeScreenShot(), do_write_image_or_movie(), envmap_save_exec(), save_as_check(), save_image_doit(), and screenshot_exec().
| Image* BKE_add_image_file | ( | const char * | name | ) | [read] |
Definition at line 340 of file image.c.
References Image::anim, BLI_path_abs(), BLI_strncpy(), BLI_testextensie_array(), FILE_MAX, ListBase::first, G, Image::id, IMA_OK, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_SRC_MOVIE, IMA_SRC_VIEWER, IMA_TYPE_IMAGE, Main::image, image_alloc(), imb_ext_movie, Global::main, Main::name, Image::name, ID::next, NULL, O_BINARY, Image::ok, Image::source, str, and ID::us.
Referenced by background_image_add_invoke(), drop_named_image_invoke(), node_add_file_exec(), open_exec(), and DocumentImporter::writeImage().
Definition at line 447 of file image.c.
References BLI_path_basename(), BLI_strncpy(), FILE_MAX, IMA_NO_INDEX, IMA_OK_LOADED, IMA_SRC_FILE, IMA_TYPE_IMAGE, image_alloc(), image_assign_ibuf(), Image::name, ImBuf::name, and Image::ok.
Referenced by texture_paint_image_from_view_exec().
| Image* BKE_add_image_size | ( | unsigned int | width, |
| unsigned int | height, | ||
| const char * | name, | ||
| int | depth, | ||
| int | floatbuf, | ||
| short | uvtestgrid, | ||
| float | color[4] | ||
| ) | [read] |
Definition at line 423 of file image.c.
References add_ibuf_size(), BLI_strncpy(), FILE_MAX, Image::gen_flag, Image::gen_type, Image::gen_x, Image::gen_y, IMA_GEN_FLOAT, IMA_NO_INDEX, IMA_OK_LOADED, IMA_SRC_GENERATED, IMA_TYPE_UV_TEST, image_alloc(), image_assign_ibuf(), Image::name, and Image::ok.
Referenced by image_new_exec().
| int BKE_alphatest_ibuf | ( | ImBuf * | ibuf | ) |
Definition at line 1223 of file image.c.
References FALSE, ImBuf::rect, ImBuf::rect_float, TRUE, ImBuf::x, and ImBuf::y.
Referenced by RE_bake_ibuf_filter(), and save_image_doit().
| int BKE_ftype_to_imtype | ( | int | ftype | ) |
Definition at line 2091 of file image.c.
References add_ibuf_size(), BLI_lock_thread(), BLI_unlock_thread(), MakeCursor::color, Image::gen_flag, Image::gen_type, Image::gen_x, Image::gen_y, IB_rect, IMA_GEN_FLOAT, IMA_NO_INDEX, IMA_OK_LOADED, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_VIEWER, IMA_TYPE_COMPOSITE, IMA_TYPE_IMAGE, IMA_TYPE_MULTILAYER, IMA_TYPE_R_RESULT, image_assign_ibuf(), image_get_ibuf(), image_get_ibuf_multilayer(), image_get_ibuf_threadsafe(), image_get_render_result(), image_load_image_file(), image_load_movie_file(), image_load_sequence_file(), image_load_sequence_multilayer(), IMB_allocImBuf(), ImBuf::index, LOCK_IMAGE, LOCK_VIEWER, Image::name, NULL, ImageUser::ok, Image::ok, Image::source, tag_image_time(), and Image::type.
Referenced by BKE_image_get_ibuf(), draw_nodespace_back_pix(), ED_image_size(), ED_space_image_acquire_buffer(), image_rect_update(), node_composit_exec_splitviewer(), node_composit_exec_viewer(), sample_apply(), screen_opengl_render_anim_step(), screen_opengl_render_apply(), snode_bg_viewmove_invoke(), and uiTemplateImage().
| RenderResult* BKE_image_acquire_renderresult | ( | Scene * | scene, |
| Image * | ima | ||
| ) | [read] |
Definition at line 1561 of file image.c.
References Scene::id, IMA_TYPE_R_RESULT, Image::last_render_slot, ID::name, NULL, RE_AcquireResultRead(), RE_GetRender(), Image::render_slot, Image::renders, Image::rr, and Image::type.
Referenced by draw_render_info(), save_exec(), save_image_doit(), and uiTemplateImageLayers().
| void BKE_image_all_free_anim_ibufs | ( | int | cfra | ) |
Definition at line 663 of file image.c.
References BKE_image_free_anim_ibufs(), ELEM, ListBase::first, G, Image::id, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, Main::image, Global::main, ID::next, and Image::source.
Referenced by do_render_all_options(), and record_composite_apply().
Definition at line 1439 of file image.c.
References IMA_NO_INDEX, and image_assign_ibuf().
Definition at line 1585 of file image.c.
References Scene::id, Image::last_render_slot, ID::name, NULL, RE_FreeRenderResult(), RE_GetRender(), RE_SwapResult(), Image::render_slot, and Image::renders.
Referenced by screen_render_exec(), and screen_render_invoke().
| void BKE_image_free_all_textures | ( | void | ) |
Definition at line 605 of file image.c.
References ListBase::first, ID::flag, G, IB_BITMAPDIRTY, Image::ibufs, Image::id, Tex::id, Tex::ima, Main::image, image_free_buffers(), LIB_DOIT, Global::main, ImBuf::next, ID::next, NULL, Main::tex, and ImBuf::userflags.
Referenced by RE_Database_Free().
| void BKE_image_free_anim_ibufs | ( | Image * | ima, |
| int | except_frame | ||
| ) |
Definition at line 641 of file image.c.
References BLI_remlink(), ListBase::first, IB_BITMAPDIRTY, Image::ibufs, IMA_INDEX_FRAME, IMA_NO_INDEX, IMB_freeImBuf(), ImBuf::index, MEM_freeN(), ImBuf::next, NULL, ImBuf::userdata, and ImBuf::userflags.
Referenced by BKE_image_all_free_anim_ibufs(), and load_frame_image_sequence().
Definition at line 2229 of file image.c.
References BKE_image_acquire_ibuf(), and NULL.
Referenced by apply_heights_callback(), apply_heights_data(), apply_tangmat_callback(), bake_images(), brush_gen_texture_cache(), clear_images(), colorfn(), compatible_bump_compute(), do_halo_tex(), do_lamp_tex(), do_material_tex(), do_multires_bake(), do_sky_tex(), draw_bgpic(), draw_empty_image(), draw_mesh_text(), envmaptex(), finish_bake_internal(), finish_images(), get_alpha_clone_image(), get_next_bake_face(), gpu_make_repbind(), GPU_paint_update_image(), GPU_verify_image(), icon_preview_startjob(), image_aspect(), image_de_interlace(), image_invert_exec(), image_invert_poll(), image_sample(), image_undo_restore(), imagewrap(), imagewraposa(), imagewraposa_aniso(), imapaint_canvas_set(), imapaint_paint_stroke(), imapaint_paint_sub_stroke(), init_heights_data(), BL_Texture::InitCubeMap(), BL_Texture::InitFromImage(), load_frame_image_sequence(), multiresbake_check(), multitex_nodes(), node_composit_exec_image(), node_composit_get_image(), node_composit_get_zimage(), pack_all_invoke(), pack_exec(), pack_invoke(), project_paint_begin(), project_paint_uvpixel_init(), project_paint_uvpixel_mask(), RE_bake_shade_all_selected(), record_composite_apply(), shade_tface(), BL_Texture::SplitEnvMap(), and texture_paint_camera_project_exec().
| void BKE_image_memorypack | ( | Image * | ima | ) |
Definition at line 464 of file image.c.
References PackedFile::data, ImBuf::depth, ImBuf::encodedbuffer, ImBuf::encodedsize, freePackedFile(), ImBuf::ftype, IB_BITMAPDIRTY, IB_mem, IB_rect, IMA_NO_INDEX, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_TYPE_IMAGE, image_get_ibuf(), IMB_saveiff(), MEM_callocN(), ImBuf::name, NULL, Image::packedfile, pf, PNG, PackedFile::size, Image::source, Image::type, and ImBuf::userflags.
Referenced by pack_exec().
Definition at line 319 of file image.c.
References BLI_remlink(), ListBase::first, free_libblock(), G, Image::ibufs, IMA_INDEX_FRAME, IMA_INDEX_PASS, Main::image, image_assign_ibuf(), ImBuf::index, and Global::main.
Referenced by ntreeLocalMerge().
| RenderPass* BKE_image_multilayer_index | ( | RenderResult * | rr, |
| ImageUser * | iuser | ||
| ) | [read] |
Definition at line 1527 of file image.c.
References ListBase::first, ImBuf::index, ImageUser::layer, RenderResult::layers, ImageUser::multi_index, RenderPass::next, RenderLayer::next, NULL, ImageUser::pass, and RenderLayer::passes.
Referenced by compbuf_multilayer_get(), image_get_ibuf_multilayer(), image_load_sequence_multilayer(), image_multi_cb(), image_multi_declay_cb(), image_multi_decpass_cb(), image_multi_inclay_cb(), and image_multi_incpass_cb().
| void BKE_image_print_memlist | ( | void | ) |
Definition at line 587 of file image.c.
References ListBase::first, G, Image::id, Main::image, image_mem_size(), Global::main, ID::name, ID::next, and size().
Referenced by RE_Database_Free().
| void BKE_image_release_ibuf | ( | Image * | ima, |
| void * | lock | ||
| ) |
Definition at line 2216 of file image.c.
References BLI_unlock_thread(), LOCK_VIEWER, and RE_ReleaseResultImage().
Referenced by draw_nodespace_back_pix(), ED_image_size(), ED_space_image_release_buffer(), image_rect_update(), node_composit_exec_splitviewer(), node_composit_exec_viewer(), sample_apply(), screen_opengl_render_anim_step(), screen_opengl_render_apply(), snode_bg_viewmove_invoke(), and uiTemplateImage().
Definition at line 1576 of file image.c.
References Scene::id, IMA_TYPE_R_RESULT, Image::last_render_slot, ID::name, RE_GetRender(), RE_ReleaseResult(), Image::render_slot, Image::rr, and Image::type.
Referenced by draw_render_info(), save_exec(), save_image_doit(), and uiTemplateImageLayers().
Definition at line 1444 of file image.c.
References ListBase::first, freePackedFile(), G, Image::gen_x, Image::gen_y, Image::id, Scene::id, IMA_NO_INDEX, 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_TYPE_IMAGE, IMA_TYPE_MULTILAYER, IMA_TYPE_UV_TEST, image_free_buffers(), image_get_ibuf(), ImageUser::layer, Global::main, ImageUser::multi_index, Image::name, newPackedFile(), ID::next, NodeTagIDChanged(), Scene::nodetree, NULL, ImageUser::ok, Image::ok, Image::packedfile, ImageUser::pass, pf, Main::scene, Image::source, Image::type, ImBuf::x, and ImBuf::y.
Referenced by ED_space_image_set(), image_new_exec(), node_composit_exec_composite(), open_exec(), reload_exec(), replace_exec(), screen_opengl_render_init(), screen_render_exec(), screen_render_invoke(), and unpackImage().
| void BKE_image_user_calc_frame | ( | ImageUser * | iuser, |
| int | cfra, | ||
| int | fieldnr | ||
| ) |
Definition at line 2275 of file image.c.
References BKE_image_user_get_frame(), ImageUser::flag, ImageUser::framenr, IMA_ANIM_ALWAYS, IMA_ANIM_REFRESHED, and ImageUser::ok.
Referenced by draw_bgpic(), ED_image_update_frame(), image_refresh(), init_render_texture(), node_composit_exec_image(), node_composit_exec_splitviewer(), node_composit_exec_viewer(), set_frames_cb(), and space_view3d_listener().
| int BKE_image_user_get_frame | ( | const ImageUser * | iuser, |
| int | cfra, | ||
| int | fieldnr | ||
| ) |
Definition at line 2235 of file image.c.
References ImageUser::cycl, ImageUser::fie_ima, ImageUser::frames, ImageUser::offset, and ImageUser::sfra.
| Image* BKE_image_verify_viewer | ( | int | type, |
| const char * | name | ||
| ) | [read] |
Definition at line 1420 of file image.c.
References ListBase::first, G, Image::id, id_us_plus(), IMA_SRC_VIEWER, Main::image, image_alloc(), Global::main, ID::next, NULL, Image::source, Image::type, and ID::us.
Referenced by draw_nodespace_back_pix(), node_composit_exec_composite(), node_set_active(), render_view_open(), sample_apply(), screen_opengl_render_init(), screen_render_exec(), screen_render_invoke(), and snode_bg_viewmove_invoke().
| int BKE_imtype_is_movie | ( | int | imtype | ) |
Definition at line 758 of file image.c.
References R_AVICODEC, R_AVIJPEG, R_AVIRAW, R_FFMPEG, R_FRAMESERVER, R_H264, R_QUICKTIME, R_THEORA, and R_XVID.
Referenced by do_write_image_or_movie(), RE_BlenderAnim(), RE_BlenderFrame(), RE_InitState(), screen_opengl_render_anim_initialize(), screen_opengl_render_anim_step(), screen_opengl_render_end(), screen_opengl_render_init(), screen_render_exec(), screen_render_invoke(), and screenshot_startjob().
| int BKE_imtype_to_ftype | ( | int | imtype | ) |
| void BKE_makepicstring | ( | char * | string, |
| const char * | base, | ||
| int | frame, | ||
| int | imtype, | ||
| const short | use_ext, | ||
| const short | use_frames | ||
| ) |
Definition at line 1359 of file image.c.
References BKE_add_image_extension(), BLI_path_abs(), BLI_path_frame(), BLI_strncpy(), FILE_MAX, G, Global::main, Main::name, and NULL.
Referenced by do_write_image_or_movie(), node_composit_exec_output_file(), RE_BlenderAnim(), RE_BlenderFrame(), screen_opengl_render_anim_step(), screen_opengl_render_apply(), and screenshot_startjob().
| void BKE_stamp_buf | ( | Scene * | scene, |
| Object * | camera, | ||
| unsigned char * | rect, | ||
| float * | rectf, | ||
| int | width, | ||
| int | height, | ||
| int | channels | ||
| ) |
Definition at line 1006 of file image.c.
References RenderData::bg_stamp, BLF_buffer(), BLF_buffer_col(), BLF_descender(), BLF_draw_buffer(), BLF_height_max(), blf_mono_font_render, BLF_position(), BLF_size(), BLF_width_and_height(), BLF_width_max(), buf_rectfill_area(), BUFF_MARGIN_X, BUFF_MARGIN_Y, StampData::camera, StampData::cameralens, StampData::date, RenderData::fg_stamp, StampData::file, StampData::frame, StampData::marker, mono, StampData::note, NULL, Scene::r, StampData::rendertime, StampData::scene, RenderData::stamp_font_id, stampdata(), StampData::strip, StampData::time, and simple_enum_gen::w.
Referenced by renderresult_stampinfo(), and screen_opengl_render_apply().
Definition at line 1201 of file image.c.
References StampData::camera, StampData::cameralens, StampData::date, StampData::file, StampData::frame, IMB_metadata_change_field(), StampData::marker, StampData::note, StampData::rendertime, StampData::scene, stampdata(), StampData::strip, and StampData::time.
Referenced by BKE_write_ibuf_stamp().
| int BKE_write_ibuf | ( | ImBuf * | ibuf, |
| const char * | name, | ||
| int | imtype, | ||
| int | subimtype, | ||
| int | quality | ||
| ) |
Definition at line 1246 of file image.c.
References BLI_make_existing_file(), BMP, ImBuf::depth, ELEM5, ImBuf::ftype, IB_rect, IB_zbuf, IB_zbuffloat, IMAGIC, IMB_saveiff(), JPG, NULL, OPENEXR, OPENEXR_COMPRESS, OPENEXR_HALF, PNG, R_BMP, R_CINEON, R_DDS, R_DPX, R_FFMPEG, R_H264, R_IRIS, R_JP2, R_JPEG2K_12BIT, R_JPEG2K_16BIT, R_JPEG2K_CINE_48FPS, R_JPEG2K_CINE_PRESET, R_JPEG2K_YCC, R_MULTILAYER, R_OPENEXR, R_OPENEXR_HALF, R_OPENEXR_ZBUF, R_PNG, R_RADHDR, R_RAWTGA, R_TARGA, R_THEORA, R_TIFF, R_TIFF_16BIT, R_XVID, RAWTGA, TGA, and ImBuf::zbuf_float.
Referenced by BKE_write_ibuf_stamp(), node_composit_exec_output_file(), save_envmap(), save_image_doit(), screen_opengl_render_apply(), screenshot_exec(), and screenshot_startjob().
| int BKE_write_ibuf_stamp | ( | Scene * | scene, |
| struct Object * | camera, | ||
| ImBuf * | ibuf, | ||
| const char * | name, | ||
| int | imtype, | ||
| int | subimtype, | ||
| int | quality | ||
| ) |
Definition at line 1350 of file image.c.
References BKE_stamp_info(), BKE_write_ibuf(), Scene::r, R_STAMP_ALL, and RenderData::stamp.
Referenced by do_write_image_or_movie(), and screen_opengl_render_anim_step().
Definition at line 298 of file image.c.
References Image::animspeed, Image::aspx, Image::aspy, BLI_strncpy(), Image::flag, Image::gen_type, Image::gen_x, Image::gen_y, Image::id, image_alloc(), Image::name, ID::name, Image::source, Image::tpageflag, and Image::type.
Referenced by id_copy(), and ntreeLocalize().
| static void de_interlace_ng | ( | struct ImBuf * | ibuf | ) | [static] |
Definition at line 103 of file image.c.
References ImBuf::flags, IB_fields, IB_rect, IMB_allocImBuf(), IMB_freeImBuf(), IMB_rectcpy(), NULL, ImBuf::rect, ImBuf::x, and ImBuf::y.
Referenced by image_de_interlace(), and image_initialize_after_load().
| static void de_interlace_st | ( | struct ImBuf * | ibuf | ) | [static] |
Definition at line 131 of file image.c.
References ImBuf::flags, IB_fields, IB_rect, IMB_allocImBuf(), IMB_freeImBuf(), IMB_rectcpy(), NULL, ImBuf::rect, ImBuf::x, and ImBuf::y.
Referenced by image_de_interlace(), and image_initialize_after_load().
| void free_image | ( | Image * | ima | ) |
Definition at line 200 of file image.c.
References BKE_icon_delete(), BKE_previewimg_free(), freePackedFile(), ID::icon_id, Image::id, IMA_MAX_RENDER_SLOT, image_free_buffers(), NULL, Image::packedfile, Image::preview, RE_FreeRenderResult(), and Image::renders.
Referenced by free_libblock().
| void free_old_images | ( | void | ) |
Definition at line 520 of file image.c.
References Image::bindcode, ListBase::first, Image::flag, G, GPU_free_image(), Image::ibufs, Image::id, IMA_NOCOLLECT, Main::image, image_free_buffers(), Image::lastused, Global::main, ID::next, PIL_check_seconds_timer(), Global::rendering, and Image::repbind.
Referenced by draw_object().
| static Image* image_alloc | ( | const char * | name, |
| short | source, | ||
| short | type | ||
| ) | [static] |
Definition at line 223 of file image.c.
References alloc_libblock(), Image::aspx, Image::aspy, G, Image::gen_type, Image::gen_x, Image::gen_y, ID_IM, IMA_OK, Main::image, Global::main, Image::ok, Image::source, Image::type, Image::xrep, and Image::yrep.
Referenced by BKE_add_image_file(), BKE_add_image_imbuf(), BKE_add_image_size(), BKE_image_verify_viewer(), and copy_image().
Definition at line 273 of file image.c.
References BLI_insertlinkbefore(), ListBase::first, Image::ibufs, IMA_MAKE_INDEX, IMA_NO_INDEX, image_remove_ibuf(), ImBuf::index, link(), and ImBuf::next.
Referenced by BKE_add_image_imbuf(), BKE_add_image_size(), BKE_image_acquire_ibuf(), BKE_image_assign_ibuf(), BKE_image_merge(), image_get_ibuf_multilayer(), image_get_render_result(), image_load_image_file(), image_load_movie_file(), image_load_sequence_file(), and image_load_sequence_multilayer().
Definition at line 1607 of file image.c.
References RenderResult::framenr, IMB_exr_close(), NULL, RE_MultilayerConvert(), Image::rr, ImBuf::userdata, ImBuf::x, and ImBuf::y.
Referenced by image_load_image_file(), and image_load_sequence_file().
| void image_de_interlace | ( | Image * | ima, |
| int | odd | ||
| ) |
Definition at line 159 of file image.c.
References BKE_image_get_ibuf(), de_interlace_ng(), de_interlace_st(), and NULL.
| static void image_free_buffers | ( | Image * | ima | ) | [static] |
Definition at line 172 of file image.c.
References Image::anim, BLI_remlink(), ListBase::first, GPU_free_image(), Image::ibufs, IMA_OK, IMB_free_anim(), IMB_freeImBuf(), MEM_freeN(), NULL, Image::ok, RE_FreeRenderResult(), Image::rr, and ImBuf::userdata.
Referenced by BKE_image_free_all_textures(), BKE_image_signal(), free_image(), free_old_images(), and image_load_image_file().
Definition at line 243 of file image.c.
References ListBase::first, Image::ibufs, IMA_MAKE_INDEX, IMA_NO_INDEX, ImBuf::index, ImBuf::next, and NULL.
Referenced by BKE_image_acquire_ibuf(), BKE_image_memorypack(), BKE_image_signal(), image_get_ibuf_threadsafe(), and image_get_render_result().
Definition at line 1872 of file image.c.
References BKE_image_multilayer_index(), ImBuf::channels, RenderPass::channels, ImBuf::flags, IB_PROFILE_LINEAR_RGB, IB_rectfloat, IMA_NO_INDEX, IMA_TYPE_IMAGE, image_assign_ibuf(), image_initialize_after_load(), image_load_image_file(), IMB_allocImBuf(), ImageUser::multi_index, NULL, ImageUser::ok, Image::ok, ImBuf::profile, RenderPass::rect, ImBuf::rect_float, RenderResult::rectx, RenderResult::recty, Image::rr, and Image::type.
Referenced by BKE_image_acquire_ibuf().
| static ImBuf* image_get_ibuf_threadsafe | ( | Image * | ima, |
| ImageUser * | iuser, | ||
| int * | frame_r, | ||
| int * | index_r | ||
| ) | [static] |
Definition at line 2036 of file image.c.
References ImageUser::framenr, IMA_NO_INDEX, IMA_SRC_FILE, IMA_SRC_GENERATED, IMA_SRC_MOVIE, IMA_SRC_SEQUENCE, IMA_SRC_VIEWER, IMA_TPAGE_REFRESH, IMA_TYPE_IMAGE, IMA_TYPE_MULTILAYER, image_get_ibuf(), ImBuf::index, Image::lastframe, ImageUser::multi_index, NULL, Image::source, Image::tpageflag, and Image::type.
Referenced by BKE_image_acquire_ibuf().
Definition at line 1912 of file image.c.
References BLI_findlink(), BLI_lock_thread(), ImBuf::channels, RenderPass::channels, RenderData::color_mgt_flag, ImBuf::dither, RenderData::dither_intensity, ListBase::first, ImBuf::flags, RenderResult::have_combined, IB_PROFILE_LINEAR_RGB, IB_PROFILE_NONE, IB_rectfloat, IB_zbuffloat, Scene::id, IMA_NO_INDEX, IMA_OK_LOADED, image_assign_ibuf(), image_get_ibuf(), IMB_allocImBuf(), imb_freerectImBuf(), Image::last_render_slot, ImageUser::layer, RenderResult::layers, LOCK_VIEWER, ID::name, RenderPass::next, NULL, Image::ok, ImageUser::pass, RenderLayer::passes, RenderPass::passtype, ImBuf::profile, Scene::r, R_COLOR_MANAGEMENT, RE_AcquireResultImage(), RE_GetRender(), RE_ReleaseResultImage(), ImBuf::rect, RenderPass::rect, RenderResult::rect32, ImBuf::rect_float, RenderLayer::rectf, RenderResult::rectf, RenderResult::rectx, RenderResult::recty, RenderResult::rectz, Image::render_slot, Image::renders, SCE_PASS_Z, ImageUser::scene, ImBuf::x, ImBuf::y, and ImBuf::zbuf_float.
Referenced by BKE_image_acquire_ibuf().
Definition at line 1622 of file image.c.
References Global::background, BKE_icon_changed(), BKE_icon_getid(), de_interlace_ng(), de_interlace_st(), Image::flag, G, Image::id, IMA_FIELDS, IMA_OK_LOADED, IMA_STD_FIELD, Image::lastused, NULL, Image::ok, and Image::preview.
Referenced by image_get_ibuf_multilayer(), image_load_image_file(), image_load_movie_file(), image_load_sequence_file(), and image_load_sequence_multilayer().
Definition at line 1808 of file image.c.
References BLI_path_abs(), BLI_strncpy(), PackedFile::data, detectBitmapFont(), FILE_MAX, Global::fileflags, Library::filepath, Image::flag, ImBuf::ftype, G, G_AUTOPACK, IB_metadata, IB_multilayer, IB_premul, IB_rect, Image::id, IMA_DO_PREMUL, IMA_NO_INDEX, IMA_TYPE_MULTILAYER, image_assign_ibuf(), image_create_multilayer(), image_free_buffers(), image_initialize_after_load(), IMB_freeImBuf(), IMB_ibImageFromMemory(), IMB_loadiffname(), ID::lib, Global::main, Main::name, Image::name, newPackedFile(), NULL, ImageUser::ok, Image::ok, OPENEXR, Image::packedfile, PackedFile::size, str, Image::type, and ImBuf::userdata.
Referenced by BKE_image_acquire_ibuf(), and image_get_ibuf_multilayer().
Definition at line 1761 of file image.c.
References Image::anim, BLI_path_abs(), BLI_strncpy(), FILE_MAX, Library::filepath, ImageUser::frames, G, IB_rect, Image::id, image_assign_ibuf(), image_initialize_after_load(), IMB_anim_absolute(), IMB_anim_get_duration(), Image::lastframe, ID::lib, Global::main, Main::name, Image::name, NULL, ImageUser::ok, Image::ok, openanim(), and str.
Referenced by BKE_image_acquire_ibuf().
Definition at line 1640 of file image.c.
References AT, BLI_path_abs(), BLI_stringdec(), BLI_stringenc(), BLI_strncpy(), FILE_MAX, Library::filepath, Image::flag, ImBuf::ftype, G, IB_multilayer, IB_premul, IB_rect, Image::id, IMA_DO_PREMUL, IMA_TPAGE_REFRESH, IMA_TYPE_MULTILAYER, image_assign_ibuf(), image_create_multilayer(), image_initialize_after_load(), IMB_freeImBuf(), IMB_loadiffname(), Image::lastframe, ID::lib, Global::main, Main::name, Image::name, ImBuf::name, NULL, ImageUser::ok, Image::ok, OPENEXR, Image::tpageflag, Image::type, and ImBuf::userdata.
Referenced by BKE_image_acquire_ibuf(), and image_load_sequence_multilayer().
Definition at line 1703 of file image.c.
References BKE_image_multilayer_index(), ImBuf::channels, RenderPass::channels, ImBuf::flags, RenderResult::framenr, IB_PROFILE_LINEAR_RGB, IB_rectfloat, IMA_TYPE_IMAGE, image_assign_ibuf(), image_initialize_after_load(), image_load_sequence_file(), IMB_allocImBuf(), ImBuf::mall, MEM_dupallocN(), ImageUser::multi_index, NULL, ImageUser::ok, Image::ok, ImBuf::profile, RE_FreeRenderResult(), RenderPass::rect, ImBuf::rect_float, RenderResult::rectx, RenderResult::recty, Image::rr, and Image::type.
Referenced by BKE_image_acquire_ibuf().
| static uintptr_t image_mem_size | ( | Image * | ima | ) | [static] |
Definition at line 559 of file image.c.
References ListBase::first, IB_MIPMAP_LEVELS, Image::ibufs, IMA_SRC_VIEWER, MEM_allocN_len(), ImBuf::mipmap, ImBuf::next, ImBuf::rect, ImBuf::rect_float, size(), and Image::source.
Referenced by BKE_image_print_memlist().
Definition at line 263 of file image.c.
References BLI_remlink(), Image::ibufs, and IMB_freeImBuf().
Referenced by image_assign_ibuf().
| struct anim* openanim | ( | char * | name, |
| int | flags | ||
| ) | [read] |
Definition at line 1374 of file image.c.
References BLI_exists(), IMB_anim_absolute(), IMB_free_anim(), IMB_freeImBuf(), IMB_open_anim(), and NULL.
Referenced by image_load_movie_file(), reload_sequence_new_file(), seq_proxy_fetch(), seq_render_strip(), and sequencer_add_movie_strip().
| static void stampdata | ( | Scene * | scene, |
| Object * | camera, | ||
| StampData * | stamp_data, | ||
| int | do_prefix | ||
| ) | [static] |
Definition at line 880 of file image.c.
References BLI_snprintf(), BLI_timestr(), StampData::camera, StampData::cameralens, RenderData::cfra, CFRA, Object::data, StampData::date, RenderData::efra, StampData::file, StampData::frame, RenderData::frs_sec, G, Object::id, Scene::id, RenderStats::lastframetime, Global::main, StampData::marker, Main::name, ID::name, Sequence::name, StampData::note, NULL, OB_CAMERA, Scene::r, R_STAMP_CAMERA, R_STAMP_CAMERALENS, R_STAMP_DATE, R_STAMP_FILENAME, R_STAMP_FRAME, R_STAMP_MARKER, R_STAMP_NOTE, R_STAMP_RENDERTIME, R_STAMP_SCENE, R_STAMP_SEQSTRIP, R_STAMP_TIME, RE_GetRender(), RE_GetStats(), Global::relbase_valid, StampData::rendertime, StampData::scene, scene_find_last_marker_name(), seq_foreground_frame_get(), RenderData::stamp, RenderData::stamp_udata, StampData::strip, StampData::time, and Object::type.
Referenced by BKE_stamp_buf(), and BKE_stamp_info().
| void tag_image_time | ( | Image * | ima | ) |
Definition at line 499 of file image.c.
References Image::lastused, and PIL_check_seconds_timer().
Referenced by BKE_image_acquire_ibuf(), and multitex().