Functions |
std::FILE * | output (std::FILE *file) |
| Set/get output stream for CImg library messages.
|
void | info () |
| Print informations about CImg environement variables.
|
double | eval (const char *const expression, const double x=0, const double y=0, const double z=0, const double v=0) |
| Evaluate math expression.
|
void | warn (const char *const format,...) |
| Display a warning message.
|
int | system (const char *const command, const char *const module_name=0) |
template<typename T > |
T & | temporary (const T &) |
| Get 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 () |
| Get the current endianness of the CPU.
|
template<typename T > |
void | invert_endianness (T *const buffer, const unsigned int size) |
| Invert endianness of a memory buffer.
|
template<typename T > |
T & | invert_endianness (T &a) |
| Invert endianness of a single variable.
|
unsigned long | time () |
| Get the value of a system timer with a millisecond precision.
|
void | sleep (const unsigned int milliseconds) |
| Sleep for a certain numbers of milliseconds.
|
unsigned int | wait (const unsigned int milliseconds) |
| Wait for a certain number of milliseconds since the last call.
|
template<typename T > |
T | rol (const T a, const unsigned int n=1) |
| Get a left bitwise-rotated number.
|
template<typename T > |
T | ror (const T a, const unsigned int n=1) |
| Get a right bitwise-rotated number.
|
template<typename T > |
T | abs (const T a) |
| Get the absolute value of a number.
|
template<typename T > |
T | sqr (const T val) |
| Get the square of a number.
|
int | xln (const int x) |
| Get 1 + log_10(x) .
|
template<typename t1 , typename t2 > |
cimg::superset< t1, t2 >::type | min (const t1 &a, const t2 &b) |
| Get the minimum value between two numbers.
|
template<typename t1 , typename t2 , typename t3 > |
cimg::superset2< t1, t2, t3 >::type | min (const t1 &a, const t2 &b, const t3 &c) |
| Get the minimum value between three numbers.
|
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) |
| Get the minimum value between four numbers.
|
template<typename t1 , typename t2 > |
cimg::superset< t1, t2 >::type | max (const t1 &a, const t2 &b) |
| Get the maximum value between two numbers.
|
template<typename t1 , typename t2 , typename t3 > |
cimg::superset2< t1, t2, t3 >::type | max (const t1 &a, const t2 &b, const t3 &c) |
| Get the maximum value between three numbers.
|
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) |
| Get the maximum value between four numbers.
|
template<typename T > |
T | sign (const T x) |
| Get the sign of a number.
|
template<typename T > |
unsigned int | nearest_pow2 (const T x) |
| Get the nearest power of 2 higher than a given number.
|
double | sinc (const double x) |
| Get the sinc() of a given number.
|
template<typename T > |
T | mod (const T &x, const T &m) |
| Get the modulo of a number.
|
template<typename T > |
T | minmod (const T a, const T b) |
| Get the minmod of two numbers.
|
double | rand () |
| Get a random variable between [0,1] with respect to an uniform distribution.
|
double | crand () |
| Get a random variable between [-1,1] with respect to an uniform distribution.
|
double | grand () |
| Get a random variable following a gaussian distribution and a standard deviation of 1.
|
unsigned int | prand (const double z) |
| Get a random variable following a Poisson distribution of parameter z.
|
template<typename T > |
T | round (const T x, const double y=1, const int rounding_type=0) |
| Get a rounded number.
|
char | uncase (const char x) |
| Remove the 'case' of an ASCII character.
|
void | uncase (char *const string) |
| Remove the 'case' of a C string.
|
double | atof (const char *const str) |
| Read a double number from a C-string.
|
int | strncasecmp (const char *const s1, const char *const s2, const int l) |
| Compare the first n characters of two C-strings, ignoring the case.
|
int | strcasecmp (const char *const s1, const char *const s2) |
| Compare two C-strings, ignoring the case.
|
bool | strpare (char *const s, const char delimiter=' ', const bool symmetric=false, const bool is_iterative=false) |
| Remove useless delimiters on the borders of a C-string.
|
void | strescape (char *const s) |
| Replace explicit escape sequences '' in C-strings.
|
const char * | basename (const char *const s) |
| Compute the basename of a filename.
|
std::FILE * | fopen (const char *const path, const char *const mode) |
| Open a file, and check for possible errors.
|
int | fclose (std::FILE *file) |
| Close a file, and check for possible errors.
|
const char * | temporary_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path to store temporary files.
|
const char * | imagemagick_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path to the ImageMagick's convert tool.
|
const char * | graphicsmagick_path (const char *const user_path=0, const bool reinit_path=false) |
| Get path of the GraphicsMagick's gm tool.
|
const char * | medcon_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path of the XMedcon tool.
|
const char * | ffmpeg_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path to the 'ffmpeg' command.
|
const char * | gzip_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path to the 'gzip' command.
|
const char * | gunzip_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path to the 'gunzip' command.
|
const char * | dcraw_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path to the 'dcraw' command.
|
const char * | wget_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path to the 'wget' command.
|
const char * | curl_path (const char *const user_path=0, const bool reinit_path=false) |
| Get or set path to the 'curl' command.
|
const char * | split_filename (const char *const filename, char *const body=0) |
| Split a filename into two strings 'body' and 'extension'.
|
char * | number_filename (const char *const filename, const int number, const unsigned int n, char *const string) |
| Create a numbered version of a filename.
|
const char * | file_type (std::FILE *const file, const char *const filename) |
| Try to guess the image format of a filename, using the magic numbers in its header.
|
template<typename T > |
int | fread (T *const ptr, const unsigned int nmemb, std::FILE *stream) |
| Read file data, and check for possible errors.
|
template<typename T > |
int | fwrite (const T *ptr, const unsigned int nmemb, std::FILE *stream) |
| Write data to a file, and check for possible errors.
|
char * | load_network_external (const char *const filename, char *const filename_local) |
| Load file from network as a local temporary file, using 'wget' or 'curl' if found.
|
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 centering=false) |
| Display a dialog box, where a user can click standard buttons.
|
Variables |
const double | PI = 3.14159265358979323846 |
| Definition of the mathematical constant PI.
|