Blender V2.61 - r43446
|
Go to the source code of this file.
Classes | |
struct | ImFileType |
Defines | |
#define | IM_FTYPE_FLOAT 1 |
Typedefs | |
typedef struct ImFileType | ImFileType |
Functions | |
void | imb_filetypes_init (void) |
void | imb_filetypes_exit (void) |
void | imb_tile_cache_init (void) |
void | imb_tile_cache_exit (void) |
void | imb_loadtile (struct ImBuf *ibuf, int tx, int ty, unsigned int *rect) |
void | imb_tile_cache_tile_free (struct ImBuf *ibuf, int tx, int ty) |
int | imb_is_a_png (unsigned char *buf) |
struct ImBuf * | imb_loadpng (unsigned char *mem, size_t size, int flags) |
int | imb_savepng (struct ImBuf *ibuf, const char *name, int flags) |
int | imb_is_a_targa (unsigned char *buf) |
struct ImBuf * | imb_loadtarga (unsigned char *mem, size_t size, int flags) |
int | imb_savetarga (struct ImBuf *ibuf, const char *name, int flags) |
int | imb_is_a_iris (unsigned char *mem) |
struct ImBuf * | imb_loadiris (unsigned char *mem, size_t size, int flags) |
int | imb_saveiris (struct ImBuf *ibuf, const char *name, int flags) |
int | imb_is_a_jp2 (unsigned char *buf) |
struct ImBuf * | imb_jp2_decode (unsigned char *mem, size_t size, int flags) |
int | imb_savejp2 (struct ImBuf *ibuf, const char *name, int flags) |
int | imb_is_a_jpeg (unsigned char *mem) |
int | imb_savejpeg (struct ImBuf *ibuf, const char *name, int flags) |
struct ImBuf * | imb_load_jpeg (unsigned char *buffer, size_t size, int flags) |
int | imb_is_a_bmp (unsigned char *buf) |
struct ImBuf * | imb_bmp_decode (unsigned char *mem, size_t size, int flags) |
int | imb_savebmp (struct ImBuf *ibuf, const char *name, int flags) |
struct ImBuf * | imb_cocoaLoadImage (unsigned char *mem, size_t size, int flags) |
short | imb_cocoaSaveImage (struct ImBuf *ibuf, const char *name, int flags) |
int | imb_savecineon (struct ImBuf *buf, const char *name, int flags) |
struct ImBuf * | imb_loadcineon (unsigned char *mem, size_t size, int flags) |
int | imb_is_cineon (unsigned char *buf) |
int | imb_save_dpx (struct ImBuf *buf, const char *name, int flags) |
struct ImBuf * | imb_loaddpx (unsigned char *mem, size_t size, int flags) |
int | imb_is_dpx (unsigned char *buf) |
int | imb_is_a_hdr (unsigned char *buf) |
struct ImBuf * | imb_loadhdr (unsigned char *mem, size_t size, int flags) |
int | imb_savehdr (struct ImBuf *ibuf, const char *name, int flags) |
void | imb_inittiff (void) |
int | imb_is_a_tiff (unsigned char *buf) |
struct ImBuf * | imb_loadtiff (unsigned char *mem, size_t size, int flags) |
void | imb_loadtiletiff (struct ImBuf *ibuf, unsigned char *mem, size_t size, int tx, int ty, unsigned int *rect) |
int | imb_savetiff (struct ImBuf *ibuf, const char *name, int flags) |
void * | libtiff_findsymbol (char *name) |
Variables | |
ImFileType | IMB_FILE_TYPES [] |
Definition in file IMB_filetype.h.
#define IM_FTYPE_FLOAT 1 |
Definition at line 35 of file IMB_filetype.h.
Referenced by IMB_saveiff().
typedef struct ImFileType ImFileType |
struct ImBuf* imb_bmp_decode | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 107 of file bmp.c.
References BMPINFOHEADER::biBitCount, BMPINFOHEADER::biHeight, BMPINFOHEADER::biSize, BMPINFOHEADER::biWidth, BMP, BMP_FILEHEADER_SIZE, checkbmp(), ImBuf::depth, ImBuf::ftype, i, IB_PROFILE_SRGB, IB_rect, IB_test, if(), IMB_allocImBuf(), LITTLE_LONG, LITTLE_SHORT, NULL, ImBuf::profile, ImBuf::rect, ImBuf::x, and ImBuf::y.
struct ImBuf* imb_cocoaLoadImage | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
short imb_cocoaSaveImage | ( | struct ImBuf * | ibuf, |
const char * | name, | ||
int | flags | ||
) |
void imb_filetypes_exit | ( | void | ) |
Definition at line 102 of file filetype.c.
References ImFileType::exit, ImFileType::is_a, and direntry::type.
Referenced by IMB_exit().
void imb_filetypes_init | ( | void | ) |
Definition at line 93 of file filetype.c.
References ImFileType::init, ImFileType::is_a, and direntry::type.
Referenced by IMB_init().
int imb_is_a_bmp | ( | unsigned char * | buf | ) |
Definition at line 102 of file bmp.c.
References checkbmp().
int imb_is_a_hdr | ( | unsigned char * | buf | ) |
Definition at line 164 of file radiance_hdr.c.
Referenced by imb_loadhdr().
int imb_is_a_iris | ( | unsigned char * | mem | ) |
int imb_is_a_jp2 | ( | unsigned char * | buf | ) |
Definition at line 64 of file jp2.c.
References check_jp2().
int imb_is_a_jpeg | ( | unsigned char * | mem | ) |
Definition at line 83 of file jpeg.c.
Referenced by imb_load_jpeg().
int imb_is_a_png | ( | unsigned char * | buf | ) |
Definition at line 58 of file png.c.
Referenced by imb_loadpng().
int imb_is_a_targa | ( | unsigned char * | buf | ) |
Definition at line 339 of file targa.c.
References checktarga().
int imb_is_a_tiff | ( | unsigned char * | buf | ) |
int imb_is_cineon | ( | unsigned char * | buf | ) |
Definition at line 200 of file cineon_dpx.c.
References cineonIsMemFileCineon().
Referenced by imb_loadcineon().
int imb_is_dpx | ( | unsigned char * | buf | ) |
Definition at line 217 of file cineon_dpx.c.
References dpxIsMemFileCineon().
Referenced by imb_loaddpx().
struct ImBuf* imb_jp2_decode | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 97 of file jp2.c.
References check_jp2(), error_callback(), ImBuf::ftype, i, IB_rect, IB_rectfloat, if(), IMB_allocImBuf(), IMB_rect_from_float(), ImBuf::index, info_callback(), NULL, ImBuf::planes, ImBuf::rect, ImBuf::rect_float, simple_enum_gen::w, and warning_callback().
struct ImBuf* imb_load_jpeg | ( | unsigned char * | buffer, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 445 of file jpeg.c.
References ibJpegImageFromCinfo(), imb_is_a_jpeg(), jpeg_error(), memory_source(), NULL, my_error_mgr::pub, and my_error_mgr::setjmp_buffer.
struct ImBuf* imb_loadcineon | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 205 of file cineon_dpx.c.
References imb_is_cineon(), imb_load_dpx_cineon(), and NULL.
struct ImBuf* imb_loaddpx | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 222 of file cineon_dpx.c.
References imb_is_dpx(), imb_load_dpx_cineon(), and NULL.
struct ImBuf* imb_loadhdr | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 174 of file radiance_hdr.c.
References BLU, freadcolrs(), ImBuf::ftype, GRN, IB_PROFILE_LINEAR_RGB, IB_rect, IB_rectfloat, IB_test, IMB_allocImBuf(), IMB_flipy(), imb_is_a_hdr(), IMB_rect_from_float(), MEM_freeN(), MEM_mallocN(), NULL, ImBuf::profile, ImBuf::rect_float, RED, RGBE2FLOAT(), size(), ImBuf::x, and ImBuf::y.
struct ImBuf* imb_loadiris | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 249 of file iris.c.
References BPP, expandrow(), expandrow2(), file_data, file_offset, ImBuf::ftype, IB_PROFILE_SRGB, IB_rect, IB_rectfloat, IB_test, if(), IMAGE::imagic, IMAGIC, IMB_allocImBuf(), IMB_convert_rgba_to_abgr(), imb_is_a_iris(), IMB_rect_from_float(), interleaverow(), interleaverow2(), ISRLE, MEM_freeN(), MEM_mallocN(), NULL, ImBuf::planes, ImBuf::profile, readheader(), readtab(), ImBuf::rect, ImBuf::rect_float, test_endian_zbuf(), IMAGE::type, ImBuf::x, IMAGE::xsize, ImBuf::y, IMAGE::ysize, ImBuf::zbuf, and IMAGE::zsize.
struct ImBuf* imb_loadpng | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 303 of file png.c.
References PNGReadStruct::data, ImBuf::flags, ImBuf::ftype, i, IB_metadata, IB_PROFILE_SRGB, IB_test, imb_addrectImBuf(), IMB_allocImBuf(), IMB_freeImBuf(), imb_is_a_png(), IMB_metadata_add_field(), MEM_freeN(), MEM_mallocN(), NULL, PNG, ImBuf::ppm, ImBuf::profile, ReadData(), ImBuf::rect, PNGReadStruct::seek, size(), PNGReadStruct::size, ImBuf::x, and ImBuf::y.
struct ImBuf* imb_loadtarga | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
Definition at line 529 of file targa.c.
References BIG_LONG, checktarga(), ImBuf::crect, decodetarga(), ImBuf::ftype, IB_PROFILE_SRGB, IB_rect, IB_test, IMB_allocImBuf(), IMB_convert_rgba_to_abgr(), IMB_flipy(), TARGA::imgdes, TARGA::imgtyp, ldtarga(), TARGA::mapbits, TARGA::mapsize, MEM_callocN(), MEM_freeN(), NULL, TARGA::numid, TARGA::pixsize, ImBuf::planes, ImBuf::profile, ImBuf::rect, size(), TGA, ImBuf::x, TARGA::xsize, ImBuf::y, and TARGA::ysize.
struct ImBuf* imb_loadtiff | ( | unsigned char * | mem, |
size_t | size, | ||
int | flags | ||
) | [read] |
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 505 of file tiff.c.
References ImBuf::flags, ImBuf::ftype, IB_premul, IB_test, IB_tilecache, imb_addtilesImBuf(), IMB_allocImBuf(), imb_is_a_tiff(), imb_read_tiff_pixels(), imb_tiff_client_open(), IMB_TIFF_NCB, ImBuf::mipmap, ImBuf::miptot, and NULL.
void imb_loadtile | ( | struct ImBuf * | ibuf, |
int | tx, | ||
int | ty, | ||
unsigned int * | rect | ||
) |
Definition at line 194 of file readimage.c.
References ImBuf::cachename, imb_loadtilefile(), and O_BINARY.
Referenced by imb_global_cache_tile_load().
void imb_loadtiletiff | ( | struct ImBuf * | ibuf, |
unsigned char * | mem, | ||
size_t | size, | ||
int | tx, | ||
int | ty, | ||
unsigned int * | rect | ||
) |
Definition at line 614 of file tiff.c.
References ImBuf::flags, IB_premul, IMB_premultiply_rect(), imb_tiff_client_open(), ImBuf::miplevel, NULL, ImBuf::tilex, ImBuf::tiley, ImBuf::x, ImBuf::y, and ImBuf::ytiles.
int imb_save_dpx | ( | struct ImBuf * | buf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 212 of file cineon_dpx.c.
References imb_save_dpx_cineon().
int imb_savebmp | ( | struct ImBuf * | ibuf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 203 of file bmp.c.
References BMP_FILEHEADER_SIZE, data, putIntLSB(), putShortLSB(), ImBuf::rect, ImBuf::x, and ImBuf::y.
int imb_savecineon | ( | struct ImBuf * | buf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 194 of file cineon_dpx.c.
References imb_save_dpx_cineon().
int imb_savehdr | ( | struct ImBuf * | ibuf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 334 of file radiance_hdr.c.
References ImBuf::channels, fwritecolrs(), NULL, ImBuf::rect, ImBuf::rect_float, writeHeader(), ImBuf::x, and ImBuf::y.
int imb_saveiris | ( | struct ImBuf * | ibuf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 820 of file iris.c.
References IB_zbuf, IMB_convert_rgba_to_abgr(), NULL, output_iris(), ImBuf::planes, ImBuf::rect, test_endian_zbuf(), ImBuf::x, ImBuf::y, and ImBuf::zbuf.
int imb_savejp2 | ( | struct ImBuf * | ibuf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 671 of file jp2.c.
References error_callback(), ImBuf::ftype, ibuftoimage(), info_callback(), NULL, and warning_callback().
int imb_savejpeg | ( | struct ImBuf * | ibuf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 749 of file jpeg.c.
References ImBuf::flags, IS_jstjpg, IS_maxjpg, IS_stdjpg, save_jstjpeg(), save_maxjpeg(), save_stdjpeg(), and save_vidjpeg().
int imb_savepng | ( | struct ImBuf * | ibuf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 100 of file png.c.
References ImBuf::encodedsize, Flush(), ImBuf::ftype, i, IB_mem, imb_addencodedbufferImBuf(), ImMetaData::key, MEM_callocN(), MEM_freeN(), MEM_mallocN(), ImBuf::metadata, ImMetaData::next, NULL, ImBuf::planes, ImBuf::ppm, ImBuf::rect, ImMetaData::value, ImBuf::x, and ImBuf::y.
int imb_savetarga | ( | struct ImBuf * | ibuf, |
const char * | name, | ||
int | flags | ||
) |
Definition at line 239 of file targa.c.
References dumptarga(), ImBuf::ftype, makebody_tga(), ImBuf::planes, RAWTGA, tga_out1(), tga_out2(), tga_out3(), tga_out4(), ImBuf::x, and ImBuf::y.
int imb_savetiff | ( | ImBuf * | ibuf, |
const char * | name, | ||
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. |
name,: | Name of the TIFF file to create. |
flags,: | Currently largely ignored. |
Definition at line 671 of file tiff.c.
References copy_v3_v3(), FTOUSHORT, ImBuf::ftype, i, IB_mem, IB_PROFILE_LINEAR_RGB, linearrgb_to_srgb_v3_v3(), NULL, ImBuf::planes, ImBuf::ppm, ImBuf::profile, ImBuf::rect, ImBuf::rect_float, ImBuf::x, and ImBuf::y.
void imb_tile_cache_exit | ( | void | ) |
Definition at line 216 of file cache.c.
References BLI_ghash_free(), BLI_memarena_free(), BLI_mutex_end(), ListBase::first, imb_global_cache_tile_unload(), imb_thread_cache_exit(), ImGlobalTileCache::initialized, ImGlobalTileCache::memarena, ImGlobalTileCache::mutex, ImGlobalTile::next, NULL, ImGlobalTileCache::thread_cache, ImGlobalTileCache::tilehash, ImGlobalTileCache::tiles, and ImGlobalTileCache::totthread.
Referenced by IMB_exit(), and IMB_tile_cache_params().
void imb_tile_cache_init | ( | void | ) |
Definition at line 203 of file cache.c.
References BLI_mutex_init(), IMB_tile_cache_params(), ImGlobalTileCache::initialized, and ImGlobalTileCache::mutex.
Referenced by IMB_init().
void imb_tile_cache_tile_free | ( | struct ImBuf * | ibuf, |
int | tx, | ||
int | ty | ||
) |
Definition at line 156 of file cache.c.
References BLI_addtail(), BLI_ghash_lookup(), BLI_ghash_remove(), BLI_mutex_lock(), BLI_mutex_unlock(), BLI_remlink(), ImGlobalTile::ibuf, ImGlobalTile::loading, ImGlobalTileCache::mutex, NULL, ImGlobalTileCache::tilehash, ImGlobalTileCache::tiles, ImGlobalTile::tx, ImGlobalTile::ty, and ImGlobalTileCache::unused.
Referenced by imb_freetilesImBuf().
void* libtiff_findsymbol | ( | char * | name | ) |
Definition at line 61 of file filetype.c.
Referenced by IMB_ibImageFromMemory(), IMB_ispic_name(), imb_loadtilefile(), and IMB_saveiff().