Blender V4.5
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, int flags, ImFileColorSpace &r_colorspace)
ImBuf *(*) load_filepath (const char *filepath, int flags, ImFileColorSpace &r_colorspace)
ImBuf *(*) load_filepath_thumbnail (const char *filepath, int flags, size_t max_thumb_size, ImFileColorSpace &r_colorspace, size_t *r_width, size_t *r_height)
bool(*) save (ImBuf *ibuf, const char *filepath, int flags)
int flag
int filetype
int default_save_role

Detailed Description

Definition at line 22 of file IMB_filetype.hh.

Member Data Documentation

◆ default_save_role

int ImFileType::default_save_role

Definition at line 58 of file IMB_filetype.hh.

Referenced by IMB_colormanagement_colorspace_from_ibuf_ftype().

◆ exit

void(*) ImFileType::exit()

Optional, called once when exiting.

Definition at line 26 of file IMB_filetype.hh.

Referenced by imb_filetypes_exit().

◆ filetype

int ImFileType::filetype

eImbFileType

Definition at line 56 of file IMB_filetype.hh.

◆ flag

int ImFileType::flag

Definition at line 53 of file IMB_filetype.hh.

Referenced by IMB_save_image().

◆ init

void(*) ImFileType::init()

Optional, called once when initializing.

Definition at line 24 of file IMB_filetype.hh.

Referenced by imb_filetypes_init().

◆ is_a

bool(*) 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 33 of file IMB_filetype.hh.

Referenced by IMB_test_image_type_matches().

◆ load

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

Load an image from memory.

Definition at line 36 of file IMB_filetype.hh.

Referenced by IMB_load_image_from_memory().

◆ load_filepath

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

Load an image from a file.

Definition at line 38 of file IMB_filetype.hh.

◆ load_filepath_thumbnail

ImBuf *(*) ImFileType::load_filepath_thumbnail(const char *filepath, int 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 44 of file IMB_filetype.hh.

Referenced by IMB_thumb_load_image().

◆ save

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

Save to a file (or memory if IB_mem is set in flags and the format supports it).

Definition at line 51 of file IMB_filetype.hh.

Referenced by IMB_colormanagement_colorspace_from_ibuf_ftype(), and IMB_save_image().


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