Blender  V3.3
Macros | Functions | Variables
util.c File Reference
#include <stdlib.h>
#include "BLI_fileops.h"
#include "BLI_path_util.h"
#include "BLI_utildefines.h"
#include "IMB_filetype.h"
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
#include "imbuf.h"
#include "IMB_anim.h"

Go to the source code of this file.

Macros

#define UTIL_DEBUG   0
 
#define HEADER_SIZE   64
 

Functions

static ssize_t imb_ispic_read_header_from_filepath (const char *filepath, unsigned char buf[HEADER_SIZE])
 
int IMB_ispic_type_from_memory (const unsigned char *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)
 
static bool isavi (const char *filepath)
 
int imb_get_anim_type (const char *filepath)
 
bool IMB_isanim (const char *filepath)
 

Variables

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

Macro Definition Documentation

◆ HEADER_SIZE

#define HEADER_SIZE   64

Definition at line 107 of file util.c.

◆ UTIL_DEBUG

#define UTIL_DEBUG   0

Definition at line 41 of file util.c.

Function Documentation

◆ imb_get_anim_type()

int imb_get_anim_type ( const char *  filepath)

◆ IMB_isanim()

bool IMB_isanim ( const char *  filepath)
Attention
Defined in util.c

Definition at line 385 of file util.c.

References ANIM_SEQUENCE, imb_get_anim_type(), and type.

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

◆ IMB_ispic()

bool IMB_ispic ( const char *  filepath)
Attention
Defined in util.c

Definition at line 183 of file util.c.

References IMB_FTYPE_NONE, and IMB_ispic_type().

Referenced by build_pict_list_ex(), imb_get_anim_type(), and wm_main_playanim_intern().

◆ imb_ispic_read_header_from_filepath()

static ssize_t imb_ispic_read_header_from_filepath ( const char *  filepath,
unsigned char  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 unsigned char *  buf,
const size_t  buf_size 
)

Definition at line 138 of file util.c.

References IMB_FILE_TYPES, IMB_FILE_TYPES_LAST, IMB_FTYPE_NONE, NULL, and type.

Referenced by IMB_ispic_type(), and unpack_generate_paths().

◆ IMB_ispic_type_matches()

bool IMB_ispic_type_matches ( const char *  filepath,
int  filetype 
)

◆ isavi()

static bool isavi ( const char *  filepath)
static

Definition at line 188 of file util.c.

References AVI_is_avi(), and void.

Referenced by imb_get_anim_type().

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",
}

Sort of wrong having audio extensions in imbuf.

Definition at line 88 of file util.c.

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",
}

Definition at line 43 of file util.c.

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

◆ imb_ext_image_filepath_only

const char* imb_ext_image_filepath_only[]
Initial value:
= {
}

Image formats that can only be loaded via filepath.

Definition at line 72 of file util.c.

Referenced by imb_is_filepath_format().

◆ 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", NULL,
}

Definition at line 81 of file util.c.

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