Assimp  v3.1.1 (June 2014)
ImageExtractor.cpp File Reference

Implementation of the 'assimp extract' utility. More...

Classes

struct  BITMAPFILEHEADER
 
struct  BITMAPINFOHEADER
 
struct  TGA_HEADER
 

Macros

#define AI_EXTRACT_WRITE_BMP_ALPHA   0x1
 

Functions

int Assimp_Extract (const char *const *params, unsigned int num)
 assimp_extract utility More...
 
int DoExport (const aiTexture *tx, FILE *p, const std::string &extension, unsigned int flags)
 
int SaveAsBMP (FILE *file, const aiTexel *data, unsigned int width, unsigned int height, bool SaveAlpha=false)
 
int SaveAsTGA (FILE *file, const aiTexel *data, unsigned int width, unsigned int height)
 

Variables

const char * AICMD_MSG_DUMP_HELP_E
 
struct BITMAPFILEHEADER PACK_STRUCT
 

Detailed Description

Implementation of the 'assimp extract' utility.

Macro Definition Documentation

§ AI_EXTRACT_WRITE_BMP_ALPHA

#define AI_EXTRACT_WRITE_BMP_ALPHA   0x1

Function Documentation

§ Assimp_Extract()

int Assimp_Extract ( const char *const *  params,
unsigned int  num 
)

assimp_extract utility

Parameters
paramsCommand line parameters to 'assimp extract'
Numberof params
Returns
0 for success

§ DoExport()

int DoExport ( const aiTexture tx,
FILE *  p,
const std::string &  extension,
unsigned int  flags 
)

§ SaveAsBMP()

int SaveAsBMP ( FILE *  file,
const aiTexel data,
unsigned int  width,
unsigned int  height,
bool  SaveAlpha = false 
)

§ SaveAsTGA()

int SaveAsTGA ( FILE *  file,
const aiTexel data,
unsigned int  width,
unsigned int  height 
)

Variable Documentation

§ AICMD_MSG_DUMP_HELP_E

const char* AICMD_MSG_DUMP_HELP_E
Initial value:
=
"assimp extract <model> [<out>] [-t<n>] [-f<fmt>] [-ba] [-s] [common parameters]\n"
"\t -ba Writes BMP's with alpha channel\n"
"\t -t<n> Zero-based index of the texture to be extracted \n"
"\t -f<f> Specify the file format if <out> is omitted \n"
"\t[See the assimp_cmd docs for a full list of all common parameters] \n"
"\t -cfast Fast post processing preset, runs just a few important steps \n"
"\t -cdefault Default post processing: runs all recommended steps\n"
"\t -cfull Fires almost all post processing steps \n"

§ PACK_STRUCT

struct TGA_HEADER PACK_STRUCT