Functions |
std::FILE * | output (std::FILE *file) |
| Get/set default output stream for the CImg library messages.
|
void | info () |
| Print informations about CImg environement variables.
|
template<typename T > |
void | unused (const T &,...) |
| Avoid warning messages due to unused parameters. Do nothing actually.
|
unsigned int & | exception_mode (const unsigned int mode) |
| Set current CImg exception mode.
|
unsigned int & | exception_mode () |
| Return current CImg exception mode.
|
int | dialog (const char *const title, const char *const msg, const char *const button1_label, const char *const button2_label, const char *const button3_label, const char *const button4_label, const char *const button5_label, const char *const button6_label, const bool is_centered) |
| Display a simple dialog box, and wait for the user's response [specialization].
|
double | eval (const char *const expression, const double x, const double y, const double z, const double c) |
| Evaluate math expression.
|
void | warn (const char *const format,...) |
| Display a warning message on the default output stream.
|
int | system (const char *const command, const char *const module_name=0) |
template<typename T > |
T & | temporary (const T &) |
| Return a reference to a temporary variable of type T.
|
template<typename T > |
void | swap (T &a, T &b) |
| Exchange values of variables a and b .
|
template<typename T1 , typename T2 > |
void | swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2) |
| Exchange values of variables (a1 ,a2 ) and (b1 ,b2 ).
|
template<typename T1 , typename T2 , typename T3 > |
void | swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2, T3 &a3, T3 &b3) |
| Exchange values of variables (a1 ,a2 ,a3 ) and (b1 ,b2 ,b3 ).
|
template<typename T1 , typename T2 , typename T3 , typename T4 > |
void | swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2, T3 &a3, T3 &b3, T4 &a4, T4 &b4) |
| Exchange values of variables (a1 ,a2 ,...,a4 ) and (b1 ,b2 ,...,b4 ).
|
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 > |
void | swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2, T3 &a3, T3 &b3, T4 &a4, T4 &b4, T5 &a5, T5 &b5) |
| Exchange values of variables (a1 ,a2 ,...,a5 ) and (b1 ,b2 ,...,b5 ).
|
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 > |
void | swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2, T3 &a3, T3 &b3, T4 &a4, T4 &b4, T5 &a5, T5 &b5, T6 &a6, T6 &b6) |
| Exchange values of variables (a1 ,a2 ,...,a6 ) and (b1 ,b2 ,...,b6 ).
|
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 > |
void | swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2, T3 &a3, T3 &b3, T4 &a4, T4 &b4, T5 &a5, T5 &b5, T6 &a6, T6 &b6, T7 &a7, T7 &b7) |
| Exchange values of variables (a1 ,a2 ,...,a7 ) and (b1 ,b2 ,...,b7 ).
|
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 > |
void | swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2, T3 &a3, T3 &b3, T4 &a4, T4 &b4, T5 &a5, T5 &b5, T6 &a6, T6 &b6, T7 &a7, T7 &b7, T8 &a8, T8 &b8) |
| Exchange values of variables (a1 ,a2 ,...,a8 ) and (b1 ,b2 ,...,b8 ).
|
bool | endianness () |
| Return the endianness of the current architecture.
|
template<typename T > |
void | invert_endianness (T *const buffer, const unsigned long size) |
| Reverse endianness of all elements in a memory buffer.
|
template<typename T > |
T & | invert_endianness (T &a) |
| Reverse endianness of a single variable.
|
unsigned long | time () |
| Return the value of a system timer, with a millisecond precision.
|
unsigned long | tic () |
| Start tic/toc timer for time measurement between code instructions.
|
unsigned long | toc () |
| End tic/toc timer and displays elapsed time from last call to tic().
|
void | sleep (const unsigned int milliseconds) |
| Sleep for a given numbers of milliseconds.
|
unsigned int | wait (const unsigned int milliseconds) |
| Wait for a given number of milliseconds since the last call to wait().
|
double | rand () |
| Return a random variable between [0,1] with respect to an uniform distribution.
|
double | crand () |
| Return a random variable between [-1,1] with respect to an uniform distribution.
|
double | grand () |
| Return a random variable following a gaussian distribution and a standard deviation of 1.
|
unsigned int | prand (const double z) |
| Return a random variable following a Poisson distribution of parameter z.
|
template<typename T > |
T | rol (const T a, const unsigned int n=1) |
| Bitwise-rotate value on the left.
|
template<typename T > |
T | ror (const T a, const unsigned int n=1) |
| Bitwise-rotate value on the right.
|
template<typename T > |
T | abs (const T a) |
| Return absolute value of a value.
|
template<typename T > |
T | sqr (const T val) |
| Return square of a value.
|
int | xln (const int x) |
| Return 1 + log_10(x) of a value x .
|
template<typename t1 , typename t2 > |
cimg::superset< t1, t2 >::type | min (const t1 &a, const t2 &b) |
| Return the minimum between two values.
|
template<typename t1 , typename t2 , typename t3 > |
cimg::superset2< t1, t2, t3 >::type | min (const t1 &a, const t2 &b, const t3 &c) |
| Return the minimum between three values.
|
template<typename t1 , typename t2 , typename t3 , typename t4 > |
cimg::superset3< t1, t2, t3,
t4 >::type | min (const t1 &a, const t2 &b, const t3 &c, const t4 &d) |
| Return the minimum between four values.
|
template<typename t1 , typename t2 > |
cimg::superset< t1, t2 >::type | max (const t1 &a, const t2 &b) |
| Return the maximum between two values.
|
template<typename t1 , typename t2 , typename t3 > |
cimg::superset2< t1, t2, t3 >::type | max (const t1 &a, const t2 &b, const t3 &c) |
| Return the maximum between three values.
|
template<typename t1 , typename t2 , typename t3 , typename t4 > |
cimg::superset3< t1, t2, t3,
t4 >::type | max (const t1 &a, const t2 &b, const t3 &c, const t4 &d) |
| Return the maximum between four values.
|
template<typename T > |
T | sign (const T x) |
| Return the sign of a value.
|
template<typename T > |
unsigned int | nearest_pow2 (const T x) |
| Return the nearest power of 2 higher than given value.
|
double | sinc (const double x) |
| Return the sinc of a given value.
|
template<typename T > |
T | mod (const T &x, const T &m) |
| Return the modulo of a value.
|
template<typename T > |
T | minmod (const T a, const T b) |
| Return the min-mod of two values.
|
double | log2 (const double x) |
| Return base-2 logarithm of a value.
|
template<typename T > |
T | round (const T x, const double y=1, const int rounding_type=0) |
| Return rounded value.
|
char | uncase (const char x) |
| Convert ascii character to lower case.
|
void | uncase (char *const str) |
| Convert C-string to lower case.
|
double | atof (const char *const str) |
| Read value in a C-string.
|
int | strncasecmp (const char *const str1, const char *const str2, const int l) |
| Compare the first l characters of two C-strings, ignoring the case.
|
int | strcasecmp (const char *const str1, const char *const str2) |
| Compare two C-strings, ignoring the case.
|
bool | strpare (char *const str, const char delimiter=' ', const bool is_symmetric=false, const bool is_iterative=false) |
| Remove delimiters on the start and/or end of a C-string.
|
void | strescape (char *const str) |
| Replace escape sequences in C-strings by their binary ascii values.
|
const char * | basename (const char *const str) |
| Return the basename of a filename.
|
std::FILE * | fopen (const char *const path, const char *const mode) |
| Open a file.
|
int | fclose (std::FILE *file) |
| Close a file.
|
const char * | temporary_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to store temporary files.
|
const char * | imagemagick_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the Program Files/ directory (Windows only).
|
const char * | graphicsmagick_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the GraphicsMagick's gm binary.
|
const char * | medcon_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the XMedcon's medcon binary.
|
const char * | ffmpeg_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the FFMPEG's ffmpeg binary.
|
const char * | gzip_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the gzip binary.
|
const char * | gunzip_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the gzip binary.
|
const char * | dcraw_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the dcraw binary.
|
const char * | wget_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the wget binary.
|
const char * | curl_path (const char *const user_path=0, const bool reinit_path=false) |
| Get/set path to the curl binary.
|
const char * | split_filename (const char *const filename, char *const body=0) |
| Split filename into two C-strings body and extension .
|
char * | number_filename (const char *const filename, const int number, const unsigned int n, char *const str) |
| Generate a numbered version of a filename.
|
const char * | file_type (std::FILE *const file, const char *const filename) |
| Try to guess format from an image file.
|
template<typename T > |
int | fread (T *const ptr, const unsigned long nmemb, std::FILE *stream) |
| Read data from file.
|
template<typename T > |
int | fwrite (const T *ptr, const unsigned long nmemb, std::FILE *stream) |
| Write data to file.
|
char * | load_network_external (const char *const filename, char *const filename_local) |
| Load file from network as a local temporary file.
|
const char * | option (const char *const name, const int argc, const char *const *const argv, const char *const defaut, const char *const usage, const bool reset_static) |
| Return options specified on the command line.
|
template<typename t > |
int | dialog (const char *const title, const char *const msg, const char *const button1_label, const char *const button2_label, const char *const button3_label, const char *const button4_label, const char *const button5_label, const char *const button6_label, const CImg< t > &logo, const bool is_centered=false) |
| Display a simple dialog box, and wait for the user's response.
|
Variables |
const unsigned int | keyESC = 1U |
| Keycode for the ESC key (architecture-dependent).
|
const unsigned int | keyF1 = 2U |
| Keycode for the F1 key (architecture-dependent).
|
const unsigned int | keyF2 = 3U |
| Keycode for the F2 key (architecture-dependent).
|
const unsigned int | keyF3 = 4U |
| Keycode for the F3 key (architecture-dependent).
|
const unsigned int | keyF4 = 5U |
| Keycode for the F4 key (architecture-dependent).
|
const unsigned int | keyF5 = 6U |
| Keycode for the F5 key (architecture-dependent).
|
const unsigned int | keyF6 = 7U |
| Keycode for the F6 key (architecture-dependent).
|
const unsigned int | keyF7 = 8U |
| Keycode for the F7 key (architecture-dependent).
|
const unsigned int | keyF8 = 9U |
| Keycode for the F8 key (architecture-dependent).
|
const unsigned int | keyF9 = 10U |
| Keycode for the F9 key (architecture-dependent).
|
const unsigned int | keyF10 = 11U |
| Keycode for the F10 key (architecture-dependent).
|
const unsigned int | keyF11 = 12U |
| Keycode for the F11 key (architecture-dependent).
|
const unsigned int | keyF12 = 13U |
| Keycode for the F12 key (architecture-dependent).
|
const unsigned int | keyPAUSE = 14U |
| Keycode for the PAUSE key (architecture-dependent).
|
const unsigned int | key1 = 15U |
| Keycode for the 1 key (architecture-dependent).
|
const unsigned int | key2 = 16U |
| Keycode for the 2 key (architecture-dependent).
|
const unsigned int | key3 = 17U |
| Keycode for the 3 key (architecture-dependent).
|
const unsigned int | key4 = 18U |
| Keycode for the 4 key (architecture-dependent).
|
const unsigned int | key5 = 19U |
| Keycode for the 5 key (architecture-dependent).
|
const unsigned int | key6 = 20U |
| Keycode for the 6 key (architecture-dependent).
|
const unsigned int | key7 = 21U |
| Keycode for the 7 key (architecture-dependent).
|
const unsigned int | key8 = 22U |
| Keycode for the 8 key (architecture-dependent).
|
const unsigned int | key9 = 23U |
| Keycode for the 9 key (architecture-dependent).
|
const unsigned int | key0 = 24U |
| Keycode for the 0 key (architecture-dependent).
|
const unsigned int | keyBACKSPACE = 25U |
| Keycode for the BACKSPACE key (architecture-dependent).
|
const unsigned int | keyINSERT = 26U |
| Keycode for the INSERT key (architecture-dependent).
|
const unsigned int | keyHOME = 27U |
| Keycode for the HOME key (architecture-dependent).
|
const unsigned int | keyPAGEUP = 28U |
| Keycode for the PAGEUP key (architecture-dependent).
|
const unsigned int | keyTAB = 29U |
| Keycode for the TAB key (architecture-dependent).
|
const unsigned int | keyQ = 30U |
| Keycode for the Q key (architecture-dependent).
|
const unsigned int | keyW = 31U |
| Keycode for the W key (architecture-dependent).
|
const unsigned int | keyE = 32U |
| Keycode for the E key (architecture-dependent).
|
const unsigned int | keyR = 33U |
| Keycode for the R key (architecture-dependent).
|
const unsigned int | keyT = 34U |
| Keycode for the T key (architecture-dependent).
|
const unsigned int | keyY = 35U |
| Keycode for the Y key (architecture-dependent).
|
const unsigned int | keyU = 36U |
| Keycode for the U key (architecture-dependent).
|
const unsigned int | keyI = 37U |
| Keycode for the I key (architecture-dependent).
|
const unsigned int | keyO = 38U |
| Keycode for the O key (architecture-dependent).
|
const unsigned int | keyP = 39U |
| Keycode for the P key (architecture-dependent).
|
const unsigned int | keyDELETE = 40U |
| Keycode for the DELETE key (architecture-dependent).
|
const unsigned int | keyEND = 41U |
| Keycode for the END key (architecture-dependent).
|
const unsigned int | keyPAGEDOWN = 42U |
| Keycode for the PAGEDOWN key (architecture-dependent).
|
const unsigned int | keyCAPSLOCK = 43U |
| Keycode for the CAPSLOCK key (architecture-dependent).
|
const unsigned int | keyA = 44U |
| Keycode for the A key (architecture-dependent).
|
const unsigned int | keyS = 45U |
| Keycode for the S key (architecture-dependent).
|
const unsigned int | keyD = 46U |
| Keycode for the D key (architecture-dependent).
|
const unsigned int | keyF = 47U |
| Keycode for the F key (architecture-dependent).
|
const unsigned int | keyG = 48U |
| Keycode for the G key (architecture-dependent).
|
const unsigned int | keyH = 49U |
| Keycode for the H key (architecture-dependent).
|
const unsigned int | keyJ = 50U |
| Keycode for the J key (architecture-dependent).
|
const unsigned int | keyK = 51U |
| Keycode for the K key (architecture-dependent).
|
const unsigned int | keyL = 52U |
| Keycode for the L key (architecture-dependent).
|
const unsigned int | keyENTER = 53U |
| Keycode for the ENTER key (architecture-dependent).
|
const unsigned int | keySHIFTLEFT = 54U |
| Keycode for the SHIFTLEFT key (architecture-dependent).
|
const unsigned int | keyZ = 55U |
| Keycode for the Z key (architecture-dependent).
|
const unsigned int | keyX = 56U |
| Keycode for the X key (architecture-dependent).
|
const unsigned int | keyC = 57U |
| Keycode for the C key (architecture-dependent).
|
const unsigned int | keyV = 58U |
| Keycode for the V key (architecture-dependent).
|
const unsigned int | keyB = 59U |
| Keycode for the B key (architecture-dependent).
|
const unsigned int | keyN = 60U |
| Keycode for the N key (architecture-dependent).
|
const unsigned int | keyM = 61U |
| Keycode for the M key (architecture-dependent).
|
const unsigned int | keySHIFTRIGHT = 62U |
| Keycode for the SHIFTRIGHT key (architecture-dependent).
|
const unsigned int | keyARROWUP = 63U |
| Keycode for the ARROWUP key (architecture-dependent).
|
const unsigned int | keyCTRLLEFT = 64U |
| Keycode for the CTRLLEFT key (architecture-dependent).
|
const unsigned int | keyAPPLEFT = 65U |
| Keycode for the APPLEFT key (architecture-dependent).
|
const unsigned int | keyALT = 66U |
| Keycode for the ALT key (architecture-dependent).
|
const unsigned int | keySPACE = 67U |
| Keycode for the SPACE key (architecture-dependent).
|
const unsigned int | keyALTGR = 68U |
| Keycode for the ALTGR key (architecture-dependent).
|
const unsigned int | keyAPPRIGHT = 69U |
| Keycode for the APPRIGHT key (architecture-dependent).
|
const unsigned int | keyMENU = 70U |
| Keycode for the MENU key (architecture-dependent).
|
const unsigned int | keyCTRLRIGHT = 71U |
| Keycode for the CTRLRIGHT key (architecture-dependent).
|
const unsigned int | keyARROWLEFT = 72U |
| Keycode for the ARROWLEFT key (architecture-dependent).
|
const unsigned int | keyARROWDOWN = 73U |
| Keycode for the ARROWDOWN key (architecture-dependent).
|
const unsigned int | keyARROWRIGHT = 74U |
| Keycode for the ARROWRIGHT key (architecture-dependent).
|
const unsigned int | keyPAD0 = 75U |
| Keycode for the PAD0 key (architecture-dependent).
|
const unsigned int | keyPAD1 = 76U |
| Keycode for the PAD1 key (architecture-dependent).
|
const unsigned int | keyPAD2 = 77U |
| Keycode for the PAD2 key (architecture-dependent).
|
const unsigned int | keyPAD3 = 78U |
| Keycode for the PAD3 key (architecture-dependent).
|
const unsigned int | keyPAD4 = 79U |
| Keycode for the PAD4 key (architecture-dependent).
|
const unsigned int | keyPAD5 = 80U |
| Keycode for the PAD5 key (architecture-dependent).
|
const unsigned int | keyPAD6 = 81U |
| Keycode for the PAD6 key (architecture-dependent).
|
const unsigned int | keyPAD7 = 82U |
| Keycode for the PAD7 key (architecture-dependent).
|
const unsigned int | keyPAD8 = 83U |
| Keycode for the PAD8 key (architecture-dependent).
|
const unsigned int | keyPAD9 = 84U |
| Keycode for the PAD9 key (architecture-dependent).
|
const unsigned int | keyPADADD = 85U |
| Keycode for the PADADD key (architecture-dependent).
|
const unsigned int | keyPADSUB = 86U |
| Keycode for the PADSUB key (architecture-dependent).
|
const unsigned int | keyPADMUL = 87U |
| Keycode for the PADMUL key (architecture-dependent).
|
const unsigned int | keyPADDIV = 88U |
| Keycode for the PADDDIV key (architecture-dependent).
|
const double | PI = 3.14159265358979323846 |
| Value of the mathematical constant PI.
|