Blender V4.3
BKE_image_format.hh File Reference

Go to the source code of this file.

Macros

#define BKE_IMAGE_PATH_EXT_MAX   3
 
#define IMA_CHAN_FLAG_BW   1
 
#define IMA_CHAN_FLAG_RGB   2
 
#define IMA_CHAN_FLAG_RGBA   4
 

Functions

void BKE_image_format_init (ImageFormatData *imf, const bool render)
 
void BKE_image_format_copy (ImageFormatData *imf_dst, const ImageFormatData *imf_src)
 
void BKE_image_format_free (ImageFormatData *imf)
 
void BKE_image_format_update_color_space_for_type (ImageFormatData *format)
 
void BKE_image_format_blend_read_data (BlendDataReader *reader, ImageFormatData *imf)
 
void BKE_image_format_blend_write (BlendWriter *writer, ImageFormatData *imf)
 
void BKE_image_path_from_imformat (char *filepath, const char *base, const char *relbase, int frame, const ImageFormatData *im_format, bool use_ext, bool use_frames, const char *suffix)
 
void BKE_image_path_from_imtype (char *filepath, const char *base, const char *relbase, int frame, char imtype, bool use_ext, bool use_frames, const char *suffix)
 
int BKE_image_path_ext_from_imformat (const ImageFormatData *im_format, const char *r_ext[BKE_IMAGE_PATH_EXT_MAX])
 
int BKE_image_path_ext_from_imtype (const char imtype, const char *r_ext[BKE_IMAGE_PATH_EXT_MAX])
 
int BKE_image_path_ext_from_imformat_ensure (char *filepath, size_t filepath_maxncpy, const ImageFormatData *im_format)
 
int BKE_image_path_ext_from_imtype_ensure (char *filepath, size_t filepath_maxncpy, char imtype)
 
char BKE_ftype_to_imtype (int ftype, const ImbFormatOptions *options)
 
int BKE_imtype_to_ftype (char imtype, ImbFormatOptions *r_options)
 
bool BKE_imtype_is_movie (char imtype)
 
bool BKE_imtype_supports_compress (char imtype)
 
bool BKE_imtype_supports_quality (char imtype)
 
bool BKE_imtype_requires_linear_float (char imtype)
 
char BKE_imtype_valid_channels (char imtype, bool write_file)
 
char BKE_imtype_valid_depths (char imtype)
 
char BKE_imtype_from_arg (const char *imtype_arg)
 
void BKE_image_format_from_imbuf (ImageFormatData *im_format, const ImBuf *imbuf)
 
void BKE_image_format_to_imbuf (ImBuf *ibuf, const ImageFormatData *imf)
 
bool BKE_image_format_is_byte (const ImageFormatData *imf)
 
void BKE_image_format_color_management_copy (ImageFormatData *imf, const ImageFormatData *imf_src)
 
void BKE_image_format_color_management_copy_from_scene (ImageFormatData *imf, const Scene *scene)
 
void BKE_image_format_init_for_write (ImageFormatData *imf, const Scene *scene_src, const ImageFormatData *imf_src)
 

Macro Definition Documentation

◆ BKE_IMAGE_PATH_EXT_MAX

#define BKE_IMAGE_PATH_EXT_MAX   3

The number of extensions an image may have (.jpg, .jpeg for example). Add 1 as the array is nil terminated.

Definition at line 55 of file BKE_image_format.hh.

Referenced by do_ensure_image_extension(), and image_path_ext_from_imformat_impl().

◆ IMA_CHAN_FLAG_BW

#define IMA_CHAN_FLAG_BW   1

Definition at line 74 of file BKE_image_format.hh.

Referenced by BKE_imtype_valid_channels().

◆ IMA_CHAN_FLAG_RGB

#define IMA_CHAN_FLAG_RGB   2

Definition at line 75 of file BKE_image_format.hh.

Referenced by BKE_imtype_valid_channels().

◆ IMA_CHAN_FLAG_RGBA

#define IMA_CHAN_FLAG_RGBA   4

Definition at line 76 of file BKE_image_format.hh.

Referenced by BKE_imtype_valid_channels().

Function Documentation

◆ BKE_ftype_to_imtype()

◆ BKE_image_format_blend_read_data()

void BKE_image_format_blend_read_data ( BlendDataReader * reader,
ImageFormatData * imf )

◆ BKE_image_format_blend_write()

void BKE_image_format_blend_write ( BlendWriter * writer,
ImageFormatData * imf )

◆ BKE_image_format_color_management_copy()

◆ BKE_image_format_color_management_copy_from_scene()

◆ BKE_image_format_copy()

◆ BKE_image_format_free()

◆ BKE_image_format_from_imbuf()

void BKE_image_format_from_imbuf ( ImageFormatData * im_format,
const ImBuf * imbuf )

◆ BKE_image_format_init()

◆ BKE_image_format_init_for_write()

◆ BKE_image_format_is_byte()

bool BKE_image_format_is_byte ( const ImageFormatData * imf)

◆ BKE_image_format_to_imbuf()

void BKE_image_format_to_imbuf ( ImBuf * ibuf,
const ImageFormatData * imf )

◆ BKE_image_format_update_color_space_for_type()

◆ BKE_image_path_ext_from_imformat()

int BKE_image_path_ext_from_imformat ( const ImageFormatData * im_format,
const char * r_ext[BKE_IMAGE_PATH_EXT_MAX] )

Fill in an array of acceptable image extensions for the image format.

Note
In the case a file has no valid extension, the first extension should be used (r_ext[0]).
Returns
the number of extensions assigned to r_ext, 0 for unsupported formats.

Definition at line 485 of file image_format.cc.

References image_path_ext_from_imformat_impl(), and ImageFormatData::imtype.

Referenced by blender::io::hydra::cache_image_file().

◆ BKE_image_path_ext_from_imformat_ensure()

int BKE_image_path_ext_from_imformat_ensure ( char * filepath,
size_t filepath_maxncpy,
const ImageFormatData * im_format )

◆ BKE_image_path_ext_from_imtype()

int BKE_image_path_ext_from_imtype ( const char imtype,
const char * r_ext[BKE_IMAGE_PATH_EXT_MAX] )

Definition at line 491 of file image_format.cc.

References image_path_ext_from_imformat_impl().

◆ BKE_image_path_ext_from_imtype_ensure()

int BKE_image_path_ext_from_imtype_ensure ( char * filepath,
size_t filepath_maxncpy,
char imtype )

◆ BKE_image_path_from_imformat()

void BKE_image_path_from_imformat ( char * filepath,
const char * base,
const char * relbase,
int frame,
const ImageFormatData * im_format,
bool use_ext,
bool use_frames,
const char * suffix )

◆ BKE_image_path_from_imtype()

void BKE_image_path_from_imtype ( char * filepath,
const char * base,
const char * relbase,
int frame,
char imtype,
bool use_ext,
bool use_frames,
const char * suffix )

◆ BKE_imtype_from_arg()

◆ BKE_imtype_is_movie()

◆ BKE_imtype_requires_linear_float()

◆ BKE_imtype_supports_compress()

bool BKE_imtype_supports_compress ( char imtype)

Definition at line 219 of file image_format.cc.

References R_IMF_IMTYPE_PNG.

Referenced by uiTemplateImageSettings().

◆ BKE_imtype_supports_quality()

bool BKE_imtype_supports_quality ( char imtype)

◆ BKE_imtype_to_ftype()

◆ BKE_imtype_valid_channels()

◆ BKE_imtype_valid_depths()