Blender V5.3
blender::ImFileType Struct Reference

#include <IMB_filetype.hh>

Public Attributes

void(*) init ()
void(*) exit ()
bool(*) is_a (const unsigned char *buf, size_t size)
ImBuf *(*) load (const unsigned char *mem, size_t size, ImBufFlags flags, ImFileColorSpace &r_colorspace)
ImBuf *(*) load_filepath (const char *filepath, ImBufFlags flags, ImFileColorSpace &r_colorspace)
ImBuf *(*) load_filepath_thumbnail (const char *filepath, ImBufFlags flags, size_t max_thumb_size, ImFileColorSpace &r_colorspace, size_t *r_width, size_t *r_height)
bool(*) save (ImBuf *ibuf, const char *filepath, ImBufFlags flags)
Vector< uint8_t >(*) save_buffer (ImBuf *ibuf, ImBufFlags flags)
int flag
eImFileTypeCapability capability_read
eImFileTypeCapability capability_write
eImbFileType filetype
const char * filetype_id
const char ** file_extensions
int default_save_role

Detailed Description

Definition at line 24 of file IMB_filetype.hh.

Member Data Documentation

◆ capability_read

eImFileTypeCapability blender::ImFileType::capability_read

Combination of eImFileTypeCapability flags for reading.

Definition at line 63 of file IMB_filetype.hh.

Referenced by blender::IMB_ftype_capability_read().

◆ capability_write

eImFileTypeCapability blender::ImFileType::capability_write

Combination of eImFileTypeCapability flags for writing.

Definition at line 65 of file IMB_filetype.hh.

Referenced by blender::IMB_ftype_capability_write(), blender::IMB_save_image(), and blender::IMB_save_image_to_buffer().

◆ default_save_role

int blender::ImFileType::default_save_role

◆ exit

void(*) blender::ImFileType::exit()

Optional, called once when exiting.

Definition at line 28 of file IMB_filetype.hh.

Referenced by blender::imb_filetypes_exit().

◆ file_extensions

const char** blender::ImFileType::file_extensions

Null-terminated list of file extensions (including the dot). When non-null, at least one string must be set.

Definition at line 76 of file IMB_filetype.hh.

Referenced by blender::IMB_ftype_file_extensions().

◆ filetype

eImbFileType blender::ImFileType::filetype

Definition at line 67 of file IMB_filetype.hh.

◆ filetype_id

const char* blender::ImFileType::filetype_id

Upper case ID, used as a unique identifier for the file format.

Definition at line 70 of file IMB_filetype.hh.

Referenced by blender::IMB_ftype_to_id().

◆ flag

int blender::ImFileType::flag

Definition at line 60 of file IMB_filetype.hh.

Referenced by blender::ensure_byte_buffer().

◆ init

void(*) blender::ImFileType::init()

Optional, called once when initializing.

Definition at line 26 of file IMB_filetype.hh.

Referenced by blender::imb_filetypes_init().

◆ is_a

bool(*) blender::ImFileType::is_a(const unsigned char *buf, size_t size)

Check if the data matches this file types 'magic',

Note
that this may only read in a small part of the files header, see: IMB_test_image_type for details.

Definition at line 35 of file IMB_filetype.hh.

Referenced by blender::IMB_test_image_type_matches().

◆ load

ImBuf *(*) blender::ImFileType::load(const unsigned char *mem, size_t size, ImBufFlags flags, ImFileColorSpace &r_colorspace)

Load an image from memory.

Definition at line 38 of file IMB_filetype.hh.

Referenced by blender::IMB_load_image_from_memory().

◆ load_filepath

ImBuf *(*) blender::ImFileType::load_filepath(const char *filepath, ImBufFlags flags, ImFileColorSpace &r_colorspace)

Load an image from a file.

Definition at line 43 of file IMB_filetype.hh.

◆ load_filepath_thumbnail

ImBuf *(*) blender::ImFileType::load_filepath_thumbnail(const char *filepath, ImBufFlags flags, size_t max_thumb_size, ImFileColorSpace &r_colorspace, size_t *r_width, size_t *r_height)

Load/Create a thumbnail image from a filepath. max_thumb_size is maximum size of either dimension, so can return less on either or both. Should, if possible and performant, return dimensions of the full-size image in r_width & r_height.

Definition at line 49 of file IMB_filetype.hh.

Referenced by blender::IMB_thumb_load_image().

◆ save

bool(*) blender::ImFileType::save(ImBuf *ibuf, const char *filepath, ImBufFlags flags)

Save to a file.

Definition at line 56 of file IMB_filetype.hh.

Referenced by blender::IMB_colormanagement_colorspace_from_ibuf_ftype(), and blender::IMB_save_image().

◆ save_buffer

Vector< uint8_t >(*) blender::ImFileType::save_buffer(ImBuf *ibuf, ImBufFlags flags)

Save to a memory buffer.

Definition at line 56 of file IMB_filetype.hh.

Referenced by blender::IMB_save_image_to_buffer().


The documentation for this struct was generated from the following file: