Blender V4.3
image_format.cc File Reference
#include <cstring>
#include "DNA_defaults.h"
#include "DNA_scene_types.h"
#include "BLI_path_utils.hh"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "IMB_colormanagement.hh"
#include "IMB_imbuf_types.hh"
#include "BKE_colortools.hh"
#include "BKE_image_format.hh"

Go to the source code of this file.

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)
 
int BKE_imtype_to_ftype (const char imtype, ImbFormatOptions *r_options)
 
char BKE_ftype_to_imtype (const int ftype, const ImbFormatOptions *options)
 
bool BKE_imtype_is_movie (const char imtype)
 
bool BKE_imtype_supports_compress (const char imtype)
 
bool BKE_imtype_supports_quality (const char imtype)
 
bool BKE_imtype_requires_linear_float (const char imtype)
 
char BKE_imtype_valid_channels (const char imtype, bool write_file)
 
char BKE_imtype_valid_depths (const char imtype)
 
char BKE_imtype_from_arg (const char *imtype_arg)
 
static int image_path_ext_from_imformat_impl (const char imtype, const ImageFormatData *im_format, const char *r_ext[BKE_IMAGE_PATH_EXT_MAX])
 
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])
 
static bool do_ensure_image_extension (char *filepath, const size_t filepath_maxncpy, const char imtype, const ImageFormatData *im_format)
 
int BKE_image_path_ext_from_imformat_ensure (char *filepath, const size_t filepath_maxncpy, const ImageFormatData *im_format)
 
int BKE_image_path_ext_from_imtype_ensure (char *filepath, const size_t filepath_maxncpy, const char imtype)
 
static void do_makepicstring (char filepath[FILE_MAX], const char *base, const char *relbase, int frame, const char imtype, const ImageFormatData *im_format, const bool use_ext, const bool use_frames, const char *suffix)
 
void BKE_image_path_from_imformat (char *filepath, const char *base, const char *relbase, int frame, const ImageFormatData *im_format, const bool use_ext, const bool use_frames, const char *suffix)
 
void BKE_image_path_from_imtype (char *filepath, const char *base, const char *relbase, int frame, const char imtype, const bool use_ext, const bool use_frames, const char *suffix)
 
void BKE_image_format_to_imbuf (ImBuf *ibuf, const ImageFormatData *imf)
 
void BKE_image_format_from_imbuf (ImageFormatData *im_format, const ImBuf *imbuf)
 
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)
 

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,
const 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,
const size_t filepath_maxncpy,
const 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,
const bool use_ext,
const 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,
const char imtype,
const bool use_ext,
const 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 ( const 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 ( const char imtype)

◆ BKE_imtype_to_ftype()

◆ BKE_imtype_valid_channels()

◆ BKE_imtype_valid_depths()

◆ do_ensure_image_extension()

static bool do_ensure_image_extension ( char * filepath,
const size_t filepath_maxncpy,
const char imtype,
const ImageFormatData * im_format )
static

◆ do_makepicstring()

static void do_makepicstring ( char filepath[FILE_MAX],
const char * base,
const char * relbase,
int frame,
const char imtype,
const ImageFormatData * im_format,
const bool use_ext,
const bool use_frames,
const char * suffix )
static

◆ image_path_ext_from_imformat_impl()