|
Blender V4.3
|
#include "IMB_imbuf.hh"Go to the source code of this file.
Classes | |
| struct | ImFileType |
Functions | |
Format: PNG (#IMB_FTYPE_PNG) | |
| bool | imb_is_a_png (const unsigned char *mem, size_t size) |
| ImBuf * | imb_load_png (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| bool | imb_save_png (ImBuf *ibuf, const char *filepath, int flags) |
Format: TARGA (#IMB_FTYPE_TGA) | |
| bool | imb_is_a_tga (const unsigned char *mem, size_t size) |
| ImBuf * | imb_load_tga (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| bool | imb_save_tga (ImBuf *ibuf, const char *filepath, int flags) |
Format: IRIS (#IMB_FTYPE_IMAGIC) | |
| bool | imb_is_a_iris (const unsigned char *mem, size_t size) |
| ImBuf * | imb_loadiris (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| bool | imb_saveiris (ImBuf *ibuf, const char *filepath, int flags) |
Format: JP2 (#IMB_FTYPE_JP2) | |
| bool | imb_is_a_jp2 (const unsigned char *buf, size_t size) |
| ImBuf * | imb_load_jp2 (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| ImBuf * | imb_load_jp2_filepath (const char *filepath, int flags, char colorspace[IM_MAX_SPACE]) |
| bool | imb_save_jp2 (ImBuf *ibuf, const char *filepath, int flags) |
Format: JPEG (#IMB_FTYPE_JPG) | |
| bool | imb_is_a_jpeg (const unsigned char *mem, size_t size) |
| bool | imb_savejpeg (ImBuf *ibuf, const char *filepath, int flags) |
| ImBuf * | imb_load_jpeg (const unsigned char *buffer, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| ImBuf * | imb_thumbnail_jpeg (const char *filepath, int flags, size_t max_thumb_size, char colorspace[IM_MAX_SPACE], size_t *r_width, size_t *r_height) |
Format: BMP (#IMB_FTYPE_BMP) | |
| bool | imb_is_a_bmp (const unsigned char *buf, size_t size) |
| ImBuf * | imb_load_bmp (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| bool | imb_save_bmp (ImBuf *ibuf, const char *filepath, int flags) |
Format: CINEON (#IMB_FTYPE_CINEON) | |
| bool | imb_is_a_cineon (const unsigned char *buf, size_t size) |
| bool | imb_save_cineon (ImBuf *buf, const char *filepath, int flags) |
| ImBuf * | imb_load_cineon (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
Format: DPX (#IMB_FTYPE_DPX) | |
| bool | imb_is_a_dpx (const unsigned char *buf, size_t size) |
| bool | imb_save_dpx (ImBuf *ibuf, const char *filepath, int flags) |
| ImBuf * | imb_load_dpx (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
Format: HDR (#IMB_FTYPE_RADHDR) | |
| bool | imb_is_a_hdr (const unsigned char *buf, size_t size) |
| ImBuf * | imb_load_hdr (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| bool | imb_save_hdr (ImBuf *ibuf, const char *filepath, int flags) |
Format: TIFF (#IMB_FTYPE_TIF) | |
| bool | imb_is_a_tiff (const unsigned char *buf, size_t size) |
| ImBuf * | imb_load_tiff (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| bool | imb_save_tiff (ImBuf *ibuf, const char *filepath, int flags) |
Format: WEBP (#IMB_FTYPE_WEBP) | |
| bool | imb_is_a_webp (const unsigned char *buf, size_t size) |
| ImBuf * | imb_loadwebp (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
| ImBuf * | imb_load_filepath_thumbnail_webp (const char *filepath, const int flags, const size_t max_thumb_size, char colorspace[], size_t *r_width, size_t *r_height) |
| bool | imb_savewebp (ImBuf *ibuf, const char *filepath, int flags) |
Format: DDS (#IMB_FTYPE_DDS) | |
| void | imb_init_dds () |
| bool | imb_is_a_dds (const unsigned char *buf, size_t size) |
| ImBuf * | imb_load_dds (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
Format: PSD (#IMB_FTYPE_PSD) | |
| bool | imb_is_a_psd (const unsigned char *buf, size_t size) |
| ImBuf * | imb_load_psd (const unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE]) |
Format: SVG - Only for thumbnails. | |
| ImBuf * | imb_load_filepath_thumbnail_svg (const char *filepath, const int flags, const size_t max_thumb_size, char colorspace[], size_t *r_width, size_t *r_height) |
Generic File Type | |
| #define | IM_FTYPE_FLOAT 1 |
| const ImFileType | IMB_FILE_TYPES [] |
| const ImFileType * | IMB_FILE_TYPES_LAST |
| const ImFileType * | IMB_file_type_from_ftype (int ftype) |
| const ImFileType * | IMB_file_type_from_ibuf (const ImBuf *ibuf) |
| void | imb_filetypes_init () |
| void | imb_filetypes_exit () |
| #define IM_FTYPE_FLOAT 1 |
Definition at line 19 of file IMB_filetype.hh.
Referenced by IMB_saveiff().
| const ImFileType * IMB_file_type_from_ftype | ( | int | ftype | ) |
Definition at line 222 of file filetype.cc.
References IMB_FILE_TYPES, and IMB_FILE_TYPES_LAST.
Referenced by IMB_file_type_from_ibuf(), IMB_ispic_type_matches(), and IMB_thumb_load_image().
| const ImFileType * IMB_file_type_from_ibuf | ( | const ImBuf * | ibuf | ) |
Definition at line 232 of file filetype.cc.
References ImBuf::ftype, and IMB_file_type_from_ftype().
Referenced by IMB_colormanagement_colorspace_from_ibuf_ftype(), and IMB_saveiff().
| void imb_filetypes_exit | ( | ) |
Definition at line 250 of file filetype.cc.
References ImFileType::exit, IMB_FILE_TYPES, and IMB_FILE_TYPES_LAST.
Referenced by IMB_exit().
| void imb_filetypes_init | ( | ) |
Definition at line 237 of file filetype.cc.
References IMB_FILE_TYPES, IMB_FILE_TYPES_LAST, and OIIO_init().
Referenced by IMB_init().
| void imb_init_dds | ( | ) |
Definition at line 34 of file format_dds.cc.
References BLI_getenv(), and BLI_strcasestr().
| bool imb_is_a_bmp | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 17 of file format_bmp.cc.
References blender::imbuf::imb_oiio_check().
| bool imb_is_a_cineon | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 172 of file cineon_dpx.cc.
References logImageIsCineon().
Referenced by imb_load_cineon().
| bool imb_is_a_dds | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 47 of file format_dds.cc.
References blender::imbuf::imb_oiio_check().
| bool imb_is_a_dpx | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 18 of file format_dpx.cc.
References blender::imbuf::imb_oiio_check().
| bool imb_is_a_hdr | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 17 of file format_hdr.cc.
References blender::imbuf::imb_oiio_check().
| bool imb_is_a_iris | ( | const unsigned char * | mem, |
| size_t | size ) |
| bool imb_is_a_jp2 | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 71 of file jp2.cc.
References check_j2k(), and check_jp2().
| bool imb_is_a_jpeg | ( | const unsigned char * | mem, |
| size_t | size ) |
| bool imb_is_a_png | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 18 of file format_png.cc.
References blender::imbuf::imb_oiio_check().
| bool imb_is_a_psd | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 18 of file format_psd.cc.
References blender::imbuf::imb_oiio_check().
| bool imb_is_a_tga | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 17 of file format_targa.cc.
References blender::imbuf::imb_oiio_check().
| bool imb_is_a_tiff | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 18 of file format_tiff.cc.
References blender::imbuf::imb_oiio_check().
| bool imb_is_a_webp | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 33 of file webp.cc.
Referenced by imb_loadwebp().
| ImBuf * imb_load_bmp | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 22 of file format_bmp.cc.
References IMB_FTYPE_BMP, blender::imbuf::imb_oiio_read(), and size().
| ImBuf * imb_load_cineon | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 177 of file cineon_dpx.cc.
References imb_is_a_cineon(), and imb_load_dpx_cineon().
| ImBuf * imb_load_dds | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 52 of file format_dds.cc.
References IB_test, IMB_FTYPE_DDS, blender::imbuf::imb_oiio_read(), LoadDXTCImage(), and size().
| ImBuf * imb_load_dpx | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 23 of file format_dpx.cc.
References COLOR_ROLE_DEFAULT_FLOAT, ImBuf::flags, IB_alphamode_detect, IB_alphamode_premul, blender::imbuf::imb_oiio_read(), size(), and blender::imbuf::ReadContext::use_colorspace_role.
| ImBuf * imb_load_filepath_thumbnail_svg | ( | const char * | filepath, |
| const int | flags, | ||
| const size_t | max_thumb_size, | ||
| char | colorspace[], | ||
| size_t * | r_width, | ||
| size_t * | r_height ) |
Definition at line 19 of file format_svg.cc.
References ImBuf::byte_buffer, COLOR_ROLE_DEFAULT_BYTE, colorspace_set_default_role(), ImBufByteBuffer::data, float, IB_rect, IM_MAX_SPACE, IMB_allocImBuf(), IMB_flipy(), int, and w().
| ImBuf * imb_load_filepath_thumbnail_webp | ( | const char * | filepath, |
| const int | flags, | ||
| const size_t | max_thumb_size, | ||
| char | colorspace[], | ||
| size_t * | r_width, | ||
| size_t * | r_height ) |
Definition at line 78 of file webp.cc.
References BLI_mmap_free(), BLI_mmap_get_length(), BLI_mmap_get_pointer(), BLI_mmap_open(), BLI_open(), ImBuf::byte_buffer, COLOR_ROLE_DEFAULT_BYTE, colorspace_set_default_role(), ImBufByteBuffer::data, float, IB_rect, IM_MAX_SPACE, IMB_allocImBuf(), imb_mmap_lock(), imb_mmap_unlock(), O_BINARY, ImBuf::x, and ImBuf::y.
| ImBuf * imb_load_hdr | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 22 of file format_hdr.cc.
References ImBuf::flags, IB_alphamode_detect, IB_alphamode_premul, IB_rect, IMB_FTYPE_RADHDR, blender::imbuf::imb_oiio_read(), IMB_rect_from_float(), size(), and blender::imbuf::ReadContext::use_all_planes.
| ImBuf * imb_load_jp2 | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 302 of file jp2.cc.
References BufInfo::buf, BufInfo::cur, format_from_header(), imb_load_jp2_stream(), JP2_FILEHEADER_SIZE, BufInfo::len, and opj_stream_create_from_buffer().
Definition at line 317 of file jp2.cc.
References format_from_header(), imb_load_jp2_stream(), JP2_FILEHEADER_SIZE, and opj_stream_create_from_file().
| ImBuf * imb_load_jpeg | ( | const unsigned char * | buffer, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 441 of file jpeg.cc.
References COLOR_ROLE_DEFAULT_BYTE, colorspace_set_default_role(), ibJpegImageFromCinfo(), IM_MAX_SPACE, imb_is_a_jpeg(), jpeg_error(), memory_source(), my_error_mgr::pub, and my_error_mgr::setjmp_buffer.
Referenced by imb_thumbnail_jpeg().
| ImBuf * imb_load_png | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 23 of file format_png.cc.
References COLOR_ROLE_DEFAULT_BYTE, ImBuf::flags, IMB_FTYPE_PNG, blender::imbuf::imb_oiio_read(), PNG_16BIT, size(), and blender::imbuf::ReadContext::use_colorspace_role.
| ImBuf * imb_load_psd | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 23 of file format_psd.cc.
References IMB_FTYPE_PSD, blender::imbuf::imb_oiio_read(), size(), and blender::imbuf::ReadContext::use_embedded_colorspace.
| ImBuf * imb_load_tga | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 22 of file format_targa.cc.
References IMB_FTYPE_TGA, blender::imbuf::imb_oiio_read(), and size().
| ImBuf * imb_load_tiff | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Loads a TIFF file.
| mem | Memory containing the TIFF file. |
| size | Size of the mem buffer. |
| flags | If flags has IB_test set then the file is not actually loaded, but all other operations take place. |
Definition at line 23 of file format_tiff.cc.
References COLOR_ROLE_DEFAULT_BYTE, ImBuf::flags, IB_alphamode_detect, IB_alphamode_premul, IMB_FTYPE_TIF, blender::imbuf::imb_oiio_read(), size(), and blender::imbuf::ReadContext::use_colorspace_role.
| ImBuf * imb_loadiris | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Read in a B/W RGB or RGBA iris image file and return an image buffer.
Definition at line 215 of file iris.cc.
References BPP, ImBuf::byte_buffer, COLOR_ROLE_DEFAULT_BYTE, colorspace_set_default_role(), ImBufByteBuffer::data, ImBufFloatBuffer::data, ELEM, expandrow(), expandrow2(), ImBuf::float_buffer, ImBuf::ftype, HEADER_SIZE, IB_rect, IB_rectfloat, IB_test, IM_MAX_SPACE, image(), IMAGIC, IMB_allocImBuf(), IMB_convert_rgba_to_abgr(), IMB_FTYPE_IMAGIC, imb_is_a_iris(), IMB_rect_from_float(), int, interleaverow(), interleaverow2(), ISRLE, MEM_freeN(), MEM_mallocN, MFILE_CAPACITY_AT_PTR_OK_OR_FAIL, MFILE_DATA, MFILE_SEEK, MFILE_STEP, min_ii(), ImBuf::planes, readheader(), readtab(), size(), ImBuf::x, ImBuf::y, and z().
| ImBuf * imb_loadwebp | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| char | colorspace[IM_MAX_SPACE] ) |
Definition at line 41 of file webp.cc.
References ImBuf::byte_buffer, COLOR_ROLE_DEFAULT_BYTE, colorspace_set_default_role(), ImBufByteBuffer::data, ImBuf::ftype, IB_test, IM_MAX_SPACE, imb_addrectImBuf(), IMB_allocImBuf(), imb_is_a_webp(), ImBuf::x, and ImBuf::y.
Definition at line 33 of file format_bmp.cc.
References blender::imbuf::imb_create_write_context(), blender::imbuf::imb_create_write_spec(), blender::imbuf::imb_oiio_write(), and ImBuf::planes.
Definition at line 167 of file cineon_dpx.cc.
References imb_save_dpx_cineon().
Definition at line 41 of file format_dpx.cc.
References ELEM, ImbFormatOptions::flag, ImBuf::foptions, blender::imbuf::imb_create_write_context(), blender::imbuf::imb_create_write_spec(), blender::imbuf::imb_oiio_write(), ImBuf::planes, and powf.
Definition at line 44 of file format_hdr.cc.
References blender::imbuf::imb_create_write_context(), blender::imbuf::imb_create_write_spec(), and blender::imbuf::imb_oiio_write().
Definition at line 1183 of file jp2.cc.
References imb_save_jp2_stream(), and opj_stream_create_from_file().
Definition at line 43 of file format_png.cc.
References ImBuf::colormanage_flag, ImBufFloatBuffer::colorspace, ImbFormatOptions::flag, ImBuf::float_buffer, ImBuf::foptions, IMB_COLORMANAGE_IS_DATA, blender::imbuf::imb_create_write_context(), blender::imbuf::imb_create_write_spec(), blender::imbuf::imb_oiio_write(), int, ImBuf::planes, PNG_16BIT, and ImbFormatOptions::quality.
Definition at line 31 of file format_targa.cc.
References ImbFormatOptions::flag, ImBuf::foptions, blender::imbuf::imb_create_write_context(), blender::imbuf::imb_create_write_spec(), blender::imbuf::imb_oiio_write(), ImBuf::planes, and RAWTGA.
Saves a TIFF file.
ImBuf structures with 1, 3 or 4 bytes per pixel (GRAY, RGB, RGBA respectively) are accepted, and interpreted correctly. Note that the TIFF convention is to use pre-multiplied alpha, which can be achieved within Blender by setting premul alpha handling. Other alpha conventions are not strictly correct, but are permitted anyhow.
| ibuf | Image buffer. |
| filepath | Name of the TIFF file to create. |
| flags | Currently largely ignored. |
Definition at line 45 of file format_tiff.cc.
References ImBufFloatBuffer::data, ImbFormatOptions::flag, ImBuf::float_buffer, ImBuf::foptions, blender::imbuf::imb_create_write_context(), blender::imbuf::imb_create_write_spec(), blender::imbuf::imb_oiio_write(), ImBuf::planes, TIF_16BIT, TIF_COMPRESS_DEFLATE, TIF_COMPRESS_LZW, TIF_COMPRESS_NONE, and TIF_COMPRESS_PACKBITS.
Definition at line 931 of file iris.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, IMB_convert_rgba_to_abgr(), output_iris(), ImBuf::planes, ImBuf::x, and ImBuf::y.
Definition at line 746 of file jpeg.cc.
References ImBuf::flags, and save_stdjpeg().
Definition at line 161 of file webp.cc.
References BLI_fopen(), ImBuf::byte_buffer, ImBufByteBuffer::data, ImBuf::foptions, free(), MEM_freeN(), MEM_mallocN, ImBuf::planes, ImbFormatOptions::quality, ImBuf::x, and ImBuf::y.
| ImBuf * imb_thumbnail_jpeg | ( | const char * | filepath, |
| int | flags, | ||
| size_t | max_thumb_size, | ||
| char | colorspace[IM_MAX_SPACE], | ||
| size_t * | r_width, | ||
| size_t * | r_height ) |
Definition at line 479 of file jpeg.cc.
References BLI_fopen(), COLOR_ROLE_DEFAULT_BYTE, colorspace_set_default_role(), ibJpegImageFromCinfo(), IM_MAX_SPACE, imb_load_jpeg(), JPEG_APP1_MAX, jpeg_error(), JPEG_MARKER_APP1, JPEG_MARKER_MSB, JPEG_MARKER_SOI, MEM_callocN, MEM_SAFE_FREE, my_error_mgr::pub, and my_error_mgr::setjmp_buffer.
|
extern |
Definition at line 24 of file filetype.cc.
Referenced by IMB_file_type_from_ftype(), imb_filetypes_exit(), imb_filetypes_init(), IMB_ibImageFromMemory(), and IMB_ispic_type_from_memory().
|
extern |
Definition at line 220 of file filetype.cc.
Referenced by IMB_file_type_from_ftype(), imb_filetypes_exit(), imb_filetypes_init(), IMB_ibImageFromMemory(), and IMB_ispic_type_from_memory().