Blender V4.3
util.cc File Reference
#include <cstdlib>
#include "BLI_fileops.h"
#include "BLI_path_utils.hh"
#include "BLI_utildefines.h"
#include "IMB_filetype.hh"
#include "IMB_imbuf.hh"
#include "IMB_imbuf_types.hh"
#include "imbuf.hh"
#include "IMB_anim.hh"

Go to the source code of this file.

Macros

#define UTIL_DEBUG   0
 
#define HEADER_SIZE   2048
 

Functions

static int64_t imb_ispic_read_header_from_filepath (const char *filepath, uchar buf[HEADER_SIZE])
 
int IMB_ispic_type_from_memory (const uchar *buf, const size_t buf_size)
 
int IMB_ispic_type (const char *filepath)
 
bool IMB_ispic_type_matches (const char *filepath, int filetype)
 
bool IMB_ispic (const char *filepath)
 
bool IMB_isanim (const char *filepath)
 

Variables

const char * imb_ext_image []
 
const char * imb_ext_movie []
 
const char * imb_ext_audio []
 

Macro Definition Documentation

◆ HEADER_SIZE

◆ UTIL_DEBUG

#define UTIL_DEBUG   0

Function Documentation

◆ IMB_isanim()

bool IMB_isanim ( const char * filepath)

Test if the file is a video file (known format, has a video stream and supported video codec).

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

References BLI_assert, BLI_path_is_rel(), printf, and UTIL_DEBUG.

Referenced by build_pict_list(), ED_path_extension_type(), and wm_main_playanim_intern().

◆ IMB_ispic()

bool IMB_ispic ( const char * filepath)

◆ imb_ispic_read_header_from_filepath()

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

◆ IMB_ispic_type()

int IMB_ispic_type ( const char * filepath)

◆ IMB_ispic_type_from_memory()

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

◆ IMB_ispic_type_matches()

bool IMB_ispic_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 74 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[]
Initial value:
= {
".png", ".tga", ".bmp", ".jpg", ".jpeg", ".sgi", ".rgb", ".rgba", ".tif", ".tiff", ".tx",
".hdr", ".dds",
".psd", ".pdd", ".psb",
nullptr,
}

Definition at line 47 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 66 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().