Blender  V3.3
Functions
image_format.cc File Reference
#include <cstring>
#include "DNA_defaults.h"
#include "DNA_scene_types.h"
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "BKE_colortools.h"
#include "BKE_image_format.h"

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_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_zbuf (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 bool do_add_image_extension (char *string, const char imtype, const ImageFormatData *im_format)
 
int BKE_image_path_ensure_ext_from_imformat (char *string, const ImageFormatData *im_format)
 
int BKE_image_path_ensure_ext_from_imtype (char *string, const char imtype)
 
static void do_makepicstring (char *string, 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 *string, 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 *string, 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()

char BKE_ftype_to_imtype ( const int  ftype,
const ImbFormatOptions options 
)

◆ 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()

void BKE_image_format_color_management_copy ( ImageFormatData imf,
const ImageFormatData imf_src 
)

◆ BKE_image_format_color_management_copy_from_scene()

void BKE_image_format_color_management_copy_from_scene ( ImageFormatData imf,
const Scene scene 
)

◆ BKE_image_format_copy()

void BKE_image_format_copy ( ImageFormatData imf_dst,
const ImageFormatData imf_src 
)

◆ BKE_image_format_free()

void BKE_image_format_free ( ImageFormatData imf)

◆ BKE_image_format_from_imbuf()

void BKE_image_format_from_imbuf ( ImageFormatData im_format,
const ImBuf imbuf 
)

◆ BKE_image_format_init()

void BKE_image_format_init ( ImageFormatData imf,
const bool  render 
)

◆ BKE_image_format_init_for_write()

void BKE_image_format_init_for_write ( ImageFormatData imf,
const Scene scene_src,
const ImageFormatData imf_src 
)

◆ 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_path_ensure_ext_from_imformat()

int BKE_image_path_ensure_ext_from_imformat ( char *  string,
const ImageFormatData im_format 
)

Definition at line 541 of file image_format.cc.

References do_add_image_extension(), and ImageFormatData::imtype.

◆ BKE_image_path_ensure_ext_from_imtype()

int BKE_image_path_ensure_ext_from_imtype ( char *  string,
const char  imtype 
)

Definition at line 546 of file image_format.cc.

References do_add_image_extension().

Referenced by dynamicPaint_outputSurfaceImage(), and unpack_generate_paths().

◆ BKE_image_path_from_imformat()

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

Definition at line 580 of file image_format.cc.

References do_makepicstring(), and ImageFormatData::imtype.

◆ BKE_image_path_from_imtype()

void BKE_image_path_from_imtype ( char *  string,
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()

char BKE_imtype_from_arg ( const char *  arg)

◆ BKE_imtype_is_movie()

bool BKE_imtype_is_movie ( const char  imtype)

◆ BKE_imtype_requires_linear_float()

bool BKE_imtype_requires_linear_float ( const char  imtype)

◆ 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_supports_zbuf()

bool BKE_imtype_supports_zbuf ( const char  imtype)

Definition at line 209 of file image_format.cc.

References R_IMF_IMTYPE_IRIZ, and R_IMF_IMTYPE_OPENEXR.

Referenced by uiTemplateImageSettings().

◆ BKE_imtype_to_ftype()

int BKE_imtype_to_ftype ( const char  imtype,
ImbFormatOptions r_options 
)

◆ BKE_imtype_valid_channels()

char BKE_imtype_valid_channels ( const char  imtype,
bool  write_file 
)

◆ BKE_imtype_valid_depths()

char BKE_imtype_valid_depths ( const char  imtype)

◆ do_add_image_extension()

static bool do_add_image_extension ( char *  string,
const char  imtype,
const ImageFormatData im_format 
)
static

◆ do_makepicstring()

static void do_makepicstring ( char *  string,
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