Blender V5.0
util.cc File Reference
#include <cstdlib>
#include "BLI_fileops.h"
#include "BLI_path_utils.hh"
#include "IMB_filetype.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "imbuf.hh"
#include "CLG_log.h"

Go to the source code of this file.

Macros

#define HEADER_SIZE   2048

Functions

static int64_t imb_test_image_read_header_from_filepath (const char *filepath, uchar buf[HEADER_SIZE])
int IMB_test_image_type_from_memory (const uchar *buf, const size_t buf_size)
int IMB_test_image_type (const char *filepath)
bool IMB_test_image_type_matches (const char *filepath, int filetype)
bool IMB_test_image (const char *filepath)

Variables

static CLG_LogRef LOG = {"image.read"}
const char * imb_ext_image []
const char * imb_ext_movie []
const char * imb_ext_audio []

Macro Definition Documentation

◆ HEADER_SIZE

#define HEADER_SIZE   2048

Definition at line 109 of file source/blender/imbuf/intern/util.cc.

Function Documentation

◆ IMB_test_image()

bool IMB_test_image ( const char * filepath)

◆ imb_test_image_read_header_from_filepath()

int64_t imb_test_image_read_header_from_filepath ( const char * filepath,
uchar buf[HEADER_SIZE] )
static

◆ IMB_test_image_type()

int IMB_test_image_type ( const char * filepath)

◆ IMB_test_image_type_from_memory()

int IMB_test_image_type_from_memory ( const uchar * buf,
const size_t buf_size )

◆ IMB_test_image_type_matches()

bool IMB_test_image_type_matches ( const char * filepath,
int filetype )

Variable Documentation

◆ imb_ext_audio

const char* imb_ext_audio[]
Initial value:
= {
".wav",
".ogg",
".oga",
".mp3",
".mp2",
".ac3",
".aac",
".flac",
".wma",
".eac3",
".aif",
".aiff",
".m4a",
".mka",
".opus",
nullptr,
}

Sort of wrong having audio extensions in imbuf.

Definition at line 89 of file source/blender/imbuf/intern/util.cc.

Referenced by BPyInit__bpy_path(), and ED_path_extension_type().

◆ imb_ext_image

const char* imb_ext_image[]

Known image extensions, in most cases these match values for images which Blender creates, there are some exceptions to this.

See BKE_image_path_ext_from_imformat which also stores known extensions.

Definition at line 30 of file source/blender/imbuf/intern/util.cc.

Referenced by BPyInit__bpy_path(), do_ensure_image_extension(), ED_path_extension_type(), and studiolight_add_file().

◆ imb_ext_movie

const char* imb_ext_movie[]
Initial value:
= {
".avi", ".flc", ".mov", ".movie", ".mp4", ".m4v", ".m2v", ".m2t", ".m2ts", ".mts",
".ts", ".mv", ".avs", ".wmv", ".ogv", ".ogg", ".r3d", ".dv", ".mpeg", ".mpg",
".mpg2", ".vob", ".mkv", ".flv", ".divx", ".xvid", ".mxf", ".webm", ".gif", nullptr,
}

Definition at line 81 of file source/blender/imbuf/intern/util.cc.

Referenced by BKE_image_load_in_lib(), BPyInit__bpy_path(), ED_path_extension_type(), and image_replace_exec().

◆ LOG

CLG_LogRef LOG = {"image.read"}
static

Definition at line 28 of file source/blender/imbuf/intern/util.cc.