|
Blender V5.0
|
#include <cstdlib>#include "BLI_fileops.h"#include "BLI_mmap.h"#include "BLI_path_utils.hh"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "CLG_log.h"#include "IMB_allocimbuf.hh"#include "IMB_filetype.hh"#include "IMB_imbuf.hh"#include "IMB_imbuf_types.hh"#include "IMB_metadata.hh"#include "IMB_thumbs.hh"#include "imbuf.hh"#include "IMB_colormanagement.hh"#include "IMB_colormanagement_intern.hh"Go to the source code of this file.
Functions | |
| static void | imb_handle_colorspace_and_alpha (ImBuf *ibuf, const int flags, const char *filepath, const ImFileColorSpace &file_colorspace, char r_colorspace[IM_MAX_SPACE]) |
| ImBuf * | IMB_load_image_from_memory (const uchar *mem, const size_t size, const int flags, const char *descr, const char *filepath, char r_colorspace[IM_MAX_SPACE]) |
| ImBuf * | IMB_load_image_from_file_descriptor (const int file, const int flags, const char *filepath, char r_colorspace[IM_MAX_SPACE]) |
| ImBuf * | IMB_load_image_from_filepath (const char *filepath, const int flags, char r_colorspace[IM_MAX_SPACE]) |
| ImBuf * | IMB_thumb_load_image (const char *filepath, const size_t max_thumb_size, char r_colorspace[IM_MAX_SPACE], const IMBThumbLoadFlags load_flags) |
Variables | |
| static CLG_LogRef | LOG = {"image.read"} |
|
static |
Definition at line 38 of file readimage.cc.
References BLI_strncpy_utf8(), ImBuf::byte_buffer, COLOR_ROLE_DEFAULT_BYTE, COLOR_ROLE_DEFAULT_FLOAT, colormanage_colorspace_get_named(), colormanage_imbuf_make_linear(), ImBufByteBuffer::colorspace, ImBufByteBuffer::data, ImBufFloatBuffer::data, ImBuf::flags, ImBuf::float_buffer, IB_alphamode_channel_packed, IB_alphamode_detect, IB_alphamode_ignore, IB_alphamode_premul, IM_MAX_SPACE, Image, IMB_colormanagement_role_colorspace_name_get(), IMB_colormanagement_space_from_filepath_rules(), IMB_colormanagement_space_name_is_data(), IMB_premultiply_alpha(), IMB_rectfill_alpha(), IMB_unpremultiply_alpha(), ImFileColorSpace::is_hdr_float, ImFileColorSpace::metadata_colorspace, and STRNCPY_UTF8.
Referenced by IMB_load_image_from_memory(), and IMB_thumb_load_image().
| ImBuf * IMB_load_image_from_file_descriptor | ( | const int | file, |
| const int | flags, | ||
| const char * | filepath, | ||
| char | r_colorspace[IM_MAX_SPACE] ) |
Definition at line 155 of file readimage.cc.
References BLI_mmap_any_io_error(), BLI_mmap_free(), BLI_mmap_get_length(), BLI_mmap_get_pointer(), BLI_mmap_open(), CLOG_ERROR, IM_MAX_SPACE, IMB_freeImBuf(), IMB_load_image_from_memory(), LOG, and size().
Referenced by IMB_load_image_from_filepath(), and imbuf_load_impl().
| ImBuf * IMB_load_image_from_filepath | ( | const char * | filepath, |
| const int | flags, | ||
| char | r_colorspace[IM_MAX_SPACE] ) |
Definition at line 189 of file readimage.cc.
References BLI_assert, BLI_open(), BLI_path_is_rel(), ImBuf::filepath, IM_MAX_SPACE, IMB_load_image_from_file_descriptor(), O_BINARY, and STRNCPY().
Referenced by blender::seq::add_image_init_alpha_mode(), blender::seq::add_image_strip(), detect_clip_source(), GHOST_SystemWayland::getClipboardImage(), getClipboardImageFilepath(), GHOST_SystemWin32::hasClipboardImage(), ibuf_from_picture(), image_init_color_management(), IMB_thumb_load_image(), IMB_thumb_manage(), IMB_thumb_read(), load_image_single(), Freestyle::Canvas::loadMap(), movieclip_load_sequence_file(), RE_layer_load_from_file(), blender::seq::seq_proxy_fetch(), blender::seq::seq_render_image_strip_view(), studiolight_load_equirect_image(), wm_block_splash_banner_image(), wm_block_splash_image(), and wm_main_playanim_intern().
| ImBuf * IMB_load_image_from_memory | ( | const unsigned char * | mem, |
| const size_t | size, | ||
| const int | flags, | ||
| const char * | descr, | ||
| const char * | filepath = nullptr, | ||
| char | r_colorspace[IM_MAX_SPACE] = nullptr ) |
Load image.
Definition at line 121 of file readimage.cc.
References CLOG_ERROR, IB_test, IM_MAX_SPACE, IMB_FILE_TYPES, IMB_FILE_TYPES_LAST, imb_handle_colorspace_and_alpha(), ImFileType::load, LOG, and size().
Referenced by GHOST_SystemWayland::getClipboardImage(), getClipboardImageImBuf(), ibuf_from_picture(), icon_verify_datatoc(), IMB_load_image_from_file_descriptor(), imbuf_load_from_memory_impl(), load_image_single(), prefetch_task_func(), proxy_task_func(), UI_icon_to_preview(), and wm_block_splash_image().
| ImBuf * IMB_thumb_load_image | ( | const char * | filepath, |
| const size_t | max_thumb_size, | ||
| char | r_colorspace[IM_MAX_SPACE], | ||
| const IMBThumbLoadFlags | load_flags ) |
Definition at line 214 of file readimage.cc.
References BLI_file_size(), IB_byte_data, IB_metadata, IM_MAX_SPACE, IMB_file_type_from_ftype(), imb_handle_colorspace_and_alpha(), IMB_load_image_from_filepath(), IMB_metadata_ensure(), IMB_metadata_set_field(), IMB_test_image_type(), ImFileType::load_filepath_thumbnail, LoadLargeFiles, ImBuf::metadata, SNPRINTF_UTF8, THUMB_SIZE_MAX, ImBuf::x, ImBuf::y, and Zero.
Referenced by blender::seq::make_thumb_for_image(), and thumb_create_ex().
|
static |
Definition at line 36 of file readimage.cc.