|
Blender V5.0
|
#include "IMB_imbuf.hh"Go to the source code of this file.
Classes | |
| struct | ImFileType |
| struct | ImFileColorSpace |
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, ImFileColorSpace &r_colorspace) |
| 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, ImFileColorSpace &r_colorspace) |
| bool | imb_save_tga (ImBuf *ibuf, const char *filepath, int flags) |
Format: IRIS (#IMB_FTYPE_IRIS) | |
| bool | imb_is_a_iris (const unsigned char *mem, size_t size) |
| ImBuf * | imb_loadiris (const unsigned char *mem, size_t size, int flags, ImFileColorSpace &r_colorspace) |
| 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, ImFileColorSpace &r_colorspace) |
| ImBuf * | imb_load_jp2_filepath (const char *filepath, int flags, ImFileColorSpace &r_colorspace) |
| 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, ImFileColorSpace &r_colorspace) |
| ImBuf * | imb_thumbnail_jpeg (const char *filepath, int flags, size_t max_thumb_size, ImFileColorSpace &r_colorspace, size_t *r_width, size_t *r_height) |
Format: BMP (#IMB_FTYPE_BMP) | |
| bool | imb_is_a_bmp (const unsigned char *mem, size_t size) |
| ImBuf * | imb_load_bmp (const unsigned char *mem, size_t size, int flags, ImFileColorSpace &r_colorspace) |
| bool | imb_save_bmp (ImBuf *ibuf, const char *filepath, int flags) |
Format: CINEON (#IMB_FTYPE_CINEON) | |
| bool | imb_is_a_cineon (const unsigned char *mem, 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, ImFileColorSpace &r_colorspace) |
Format: DPX (#IMB_FTYPE_DPX) | |
| bool | imb_is_a_dpx (const unsigned char *mem, 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, ImFileColorSpace &r_colorspace) |
Format: HDR (#IMB_FTYPE_RADHDR) | |
| bool | imb_is_a_hdr (const unsigned char *mem, size_t size) |
| ImBuf * | imb_load_hdr (const unsigned char *mem, size_t size, int flags, ImFileColorSpace &r_colorspace) |
| bool | imb_save_hdr (ImBuf *ibuf, const char *filepath, int flags) |
Format: TIFF (#IMB_FTYPE_TIF) | |
| bool | imb_is_a_tiff (const unsigned char *mem, size_t size) |
| ImBuf * | imb_load_tiff (const unsigned char *mem, size_t size, int flags, ImFileColorSpace &r_colorspace) |
| bool | imb_save_tiff (ImBuf *ibuf, const char *filepath, int flags) |
Format: WEBP (#IMB_FTYPE_WEBP) | |
| bool | imb_is_a_webp (const unsigned char *mem, size_t size) |
| ImBuf * | imb_loadwebp (const unsigned char *mem, size_t size, int flags, ImFileColorSpace &r_colorspace) |
| ImBuf * | imb_load_filepath_thumbnail_webp (const char *filepath, const int flags, const size_t max_thumb_size, ImFileColorSpace &r_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 *mem, size_t size) |
| ImBuf * | imb_load_dds (const unsigned char *mem, size_t size, int flags, ImFileColorSpace &r_colorspace) |
Format: PSD (#IMB_FTYPE_PSD) | |
| bool | imb_is_a_psd (const unsigned char *mem, size_t size) |
| ImBuf * | imb_load_psd (const unsigned char *mem, size_t size, int flags, ImFileColorSpace &r_colorspace) |
Format: SVG - Only for thumbnails. | |
| ImBuf * | imb_load_filepath_thumbnail_svg (const char *filepath, const int flags, const size_t max_thumb_size, ImFileColorSpace &r_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 20 of file IMB_filetype.hh.
Referenced by IMB_save_image().
| 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_test_image_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_save_image().
| 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, ImFileType::init, and OIIO_init().
Referenced by IMB_init().
| void imb_init_dds | ( | ) |
Definition at line 29 of file format_dds.cc.
References BLI_getenv(), and BLI_strcasestr().
| bool imb_is_a_bmp | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 17 of file format_bmp.cc.
References blender::imbuf::imb_oiio_check(), and size().
| bool imb_is_a_cineon | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 179 of file cineon_dpx.cc.
References logImageIsCineon(), and size().
Referenced by imb_load_cineon().
| bool imb_is_a_dds | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 42 of file format_dds.cc.
References blender::imbuf::imb_oiio_check(), and size().
| bool imb_is_a_dpx | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 18 of file format_dpx.cc.
References blender::imbuf::imb_oiio_check(), and size().
| bool imb_is_a_hdr | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 17 of file format_hdr.cc.
References blender::imbuf::imb_oiio_check(), and size().
| bool imb_is_a_iris | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 255 of file format_iris.cc.
References GS, IRIS_MAGIC, and size().
Referenced by imb_loadiris().
| bool imb_is_a_jp2 | ( | const unsigned char * | buf, |
| size_t | size ) |
Definition at line 76 of file format_jp2.cc.
References check_j2k(), check_jp2(), and size().
| bool imb_is_a_jpeg | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 54 of file format_jpeg.cc.
References magic(), and size().
Referenced by imb_load_jpeg().
| 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(), and size().
| bool imb_is_a_psd | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 18 of file format_psd.cc.
References blender::imbuf::imb_oiio_check(), and size().
| 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(), and size().
| bool imb_is_a_tiff | ( | const unsigned char * | mem, |
| size_t | size ) |
Definition at line 18 of file format_tiff.cc.
References blender::imbuf::imb_oiio_check(), and size().
| bool imb_is_a_webp | ( | const unsigned char * | mem, |
| size_t | size ) |
| ImBuf * imb_load_bmp | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
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, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 184 of file cineon_dpx.cc.
References imb_is_a_cineon(), imb_load_dpx_cineon(), and size().
| ImBuf * imb_load_dds | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 47 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, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 23 of file format_dpx.cc.
References ImBuf::flags, IB_alphamode_detect, IB_alphamode_premul, blender::imbuf::imb_oiio_read(), ImFileColorSpace::is_hdr_float, and size().
| ImBuf * imb_load_filepath_thumbnail_svg | ( | const char * | filepath, |
| const int | flags, | ||
| const size_t | max_thumb_size, | ||
| ImFileColorSpace & | r_colorspace, | ||
| size_t * | r_width, | ||
| size_t * | r_height ) |
Definition at line 19 of file format_svg.cc.
References ImBuf::byte_buffer, ImBufByteBuffer::data, float, IB_byte_data, IMB_allocImBuf(), IMB_flipy(), and w().
| ImBuf * imb_load_filepath_thumbnail_webp | ( | const char * | filepath, |
| const int | flags, | ||
| const size_t | max_thumb_size, | ||
| ImFileColorSpace & | r_colorspace, | ||
| size_t * | r_width, | ||
| size_t * | r_height ) |
Definition at line 80 of file format_webp.cc.
References BLI_mmap_any_io_error(), BLI_mmap_free(), BLI_mmap_get_length(), BLI_mmap_get_pointer(), BLI_mmap_open(), BLI_open(), ImBuf::byte_buffer, CLOG_ERROR, data, ImBufByteBuffer::data, float, IB_byte_data, IMB_allocImBuf(), IMB_freeImBuf(), LOG, O_BINARY, ImBuf::x, and ImBuf::y.
| ImBuf * imb_load_hdr | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 22 of file format_hdr.cc.
References ImBuf::flags, IB_alphamode_detect, IB_alphamode_premul, IB_byte_data, IMB_byte_from_float(), IMB_FTYPE_RADHDR, blender::imbuf::imb_oiio_read(), size(), and blender::imbuf::ReadContext::use_all_planes.
| ImBuf * imb_load_jp2 | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 304 of file format_jp2.cc.
References BufInfo::buf, BufInfo::cur, format_from_header(), imb_load_jp2_stream(), JP2_FILEHEADER_SIZE, BufInfo::len, opj_stream_create_from_buffer(), and size().
| ImBuf * imb_load_jp2_filepath | ( | const char * | filepath, |
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 319 of file format_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, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 446 of file format_jpeg.cc.
References ibJpegImageFromCinfo(), imb_is_a_jpeg(), jpeg_error(), memory_source(), my_error_mgr::pub, my_error_mgr::setjmp_buffer, and size().
Referenced by imb_thumbnail_jpeg().
| ImBuf * imb_load_png | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 23 of file format_png.cc.
References ImBuf::flags, IMB_FTYPE_PNG, blender::imbuf::imb_oiio_read(), ImFileColorSpace::is_hdr_float, PNG_16BIT, and size().
| ImBuf * imb_load_psd | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 23 of file format_psd.cc.
References IMB_FTYPE_PSD, blender::imbuf::imb_oiio_read(), size(), and blender::imbuf::ReadContext::use_metadata_colorspace.
| ImBuf * imb_load_tga | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
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, | ||
| ImFileColorSpace & | r_colorspace ) |
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 ImBuf::flags, IB_alphamode_detect, IB_alphamode_premul, IMB_FTYPE_TIF, blender::imbuf::imb_oiio_read(), ImFileColorSpace::is_hdr_float, and size().
| ImBuf * imb_loadiris | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
Read in a B/W RGB or RGBA iris image file and return an image buffer.
Definition at line 263 of file format_iris.cc.
References BLI_assert, BPP, ImBuf::byte_buffer, CLOG_ERROR, ImBufByteBuffer::data, ImBufFloatBuffer::data, ELEM, expandrow(), expandrow2(), ImBuf::float_buffer, ImBuf::ftype, HEADER_SIZE, IB_byte_data, IB_float_data, IB_test, IRIS_Header::imagic, IMB_allocImBuf(), IMB_byte_from_float(), IMB_FTYPE_IRIS, imb_is_a_iris(), imbuf_rgba_to_abgr(), interleaverow(), interleaverow2(), IRIS_MAGIC, ISRLE, LOG, MEM_freeN(), MEM_malloc_arrayN(), MFILE_CAPACITY_AT_PTR_OK_OR_FAIL, MFILE_DATA, MFILE_SEEK, MFILE_STEP, min_ii(), ImBuf::planes, readheader(), readtab(), size(), IRIS_Header::type, ImBuf::x, x, IRIS_Header::xsize, ImBuf::y, y, IRIS_Header::ysize, z(), and IRIS_Header::zsize.
| ImBuf * imb_loadwebp | ( | const unsigned char * | mem, |
| size_t | size, | ||
| int | flags, | ||
| ImFileColorSpace & | r_colorspace ) |
Definition at line 45 of file format_webp.cc.
References ImBuf::byte_buffer, CLOG_ERROR, ImBufByteBuffer::data, ImBuf::ftype, IB_test, IMB_alloc_byte_pixels(), IMB_allocImBuf(), imb_is_a_webp(), LOG, size(), ImBuf::x, and ImBuf::y.
| bool imb_save_bmp | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
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.
| bool imb_save_cineon | ( | ImBuf * | buf, |
| const char * | filepath, | ||
| int | flags ) |
Definition at line 174 of file cineon_dpx.cc.
References imb_save_dpx_cineon().
| bool imb_save_dpx | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
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.
| bool imb_save_hdr | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
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().
| bool imb_save_jp2 | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
Definition at line 1178 of file format_jp2.cc.
References imb_save_jp2_stream(), and opj_stream_create_from_file().
| bool imb_save_png | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
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(), ImBuf::planes, PNG_16BIT, and ImbFormatOptions::quality.
| bool imb_save_tga | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
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.
| bool imb_save_tiff | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
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.
| bool imb_saveiris | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
Definition at line 974 of file format_iris.cc.
References ImBuf::byte_buffer, CLOG_ERROR, ImBufByteBuffer::data, imbuf_rgba_to_abgr(), LOG, output_iris(), ImBuf::planes, ImBuf::x, and ImBuf::y.
| bool imb_savejpeg | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
Definition at line 762 of file format_jpeg.cc.
References ImBuf::flags, and save_stdjpeg().
| bool imb_savewebp | ( | ImBuf * | ibuf, |
| const char * | filepath, | ||
| int | flags ) |
Definition at line 154 of file format_webp.cc.
References BLI_fopen(), ImBuf::byte_buffer, CLOG_ERROR, ImBufByteBuffer::colorspace, blender::Vector< T, InlineBufferCapacity, Allocator >::data(), ImBufByteBuffer::data, ImBuf::foptions, i, IMB_colormanagement_space_to_icc_profile(), IMB_get_pixel_count(), blender::Vector< T, InlineBufferCapacity, Allocator >::is_empty(), LOG, MEM_freeN(), MEM_malloc_arrayN(), ImBuf::planes, ImbFormatOptions::quality, blender::Vector< T, InlineBufferCapacity, Allocator >::size(), ImBuf::x, and ImBuf::y.
| ImBuf * imb_thumbnail_jpeg | ( | const char * | filepath, |
| int | flags, | ||
| size_t | max_thumb_size, | ||
| ImFileColorSpace & | r_colorspace, | ||
| size_t * | r_width, | ||
| size_t * | r_height ) |
Definition at line 485 of file format_jpeg.cc.
References BLI_fopen(), CLOG_ERROR, i, ibJpegImageFromCinfo(), imb_load_jpeg(), JPEG_APP1_MAX, jpeg_error(), JPEG_MARKER_APP1, JPEG_MARKER_MSB, JPEG_MARKER_SOI, LOG, MEM_calloc_arrayN(), 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_load_image_from_memory(), and IMB_test_image_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_load_image_from_memory(), and IMB_test_image_type_from_memory().