cimg_library::cimg Namespace Reference

Namespace that encompasses low-level functions and variables of the CImg Library. More...

Classes

struct  type
struct  type< bool >
struct  type< unsigned char >
struct  type< char >
struct  type< unsigned short >
struct  type< short >
struct  type< unsigned int >
struct  type< int >
struct  type< unsigned long >
struct  type< long >
struct  type< float >
struct  type< double >
struct  superset
struct  superset< bool, unsigned char >
struct  superset< bool, char >
struct  superset< bool, unsigned short >
struct  superset< bool, short >
struct  superset< bool, unsigned int >
struct  superset< bool, int >
struct  superset< bool, unsigned long >
struct  superset< bool, long >
struct  superset< bool, float >
struct  superset< bool, double >
struct  superset< unsigned char, char >
struct  superset< unsigned char, unsigned short >
struct  superset< unsigned char, short >
struct  superset< unsigned char, unsigned int >
struct  superset< unsigned char, int >
struct  superset< unsigned char, unsigned long >
struct  superset< unsigned char, long >
struct  superset< unsigned char, float >
struct  superset< unsigned char, double >
struct  superset< char, unsigned char >
struct  superset< char, unsigned short >
struct  superset< char, short >
struct  superset< char, unsigned int >
struct  superset< char, int >
struct  superset< char, unsigned long >
struct  superset< char, long >
struct  superset< char, float >
struct  superset< char, double >
struct  superset< unsigned short, char >
struct  superset< unsigned short, short >
struct  superset< unsigned short, unsigned int >
struct  superset< unsigned short, int >
struct  superset< unsigned short, unsigned long >
struct  superset< unsigned short, long >
struct  superset< unsigned short, float >
struct  superset< unsigned short, double >
struct  superset< short, unsigned short >
struct  superset< short, unsigned int >
struct  superset< short, int >
struct  superset< short, unsigned long >
struct  superset< short, long >
struct  superset< short, float >
struct  superset< short, double >
struct  superset< unsigned int, char >
struct  superset< unsigned int, short >
struct  superset< unsigned int, int >
struct  superset< unsigned int, unsigned long >
struct  superset< unsigned int, long >
struct  superset< unsigned int, float >
struct  superset< unsigned int, double >
struct  superset< int, unsigned int >
struct  superset< int, unsigned long >
struct  superset< int, long >
struct  superset< int, float >
struct  superset< int, double >
struct  superset< unsigned long, char >
struct  superset< unsigned long, short >
struct  superset< unsigned long, int >
struct  superset< unsigned long, long >
struct  superset< unsigned long, float >
struct  superset< unsigned long, double >
struct  superset< long, float >
struct  superset< long, double >
struct  superset< float, double >
struct  superset2
struct  superset3
struct  last

Functions

void info ()
 Print informations about CImg environement variables.
unsigned intexception_mode ()
int dialog (const char *title, const char *msg, const char *button1_txt="OK", const char *button2_txt=0, const char *button3_txt=0, const char *button4_txt=0, const char *button5_txt=0, const char *button6_txt=0, const bool centering=false)
template<typename tfunc , typename tp , typename tf >
void marching_cubes (const tfunc &func, const float isovalue, const float x0, const float y0, const float z0, const float x1, const float y1, const float z1, const float resx, const float resy, const float resz, CImgList< tp > &points, CImgList< tf > &primitives, const bool invert_faces)
 Polygonize an implicit function.
template<typename tfunc , typename tp , typename tf >
void marching_squares (const tfunc &func, const float isovalue, const float x0, const float y0, const float x1, const float y1, const float resx, const float resy, CImgList< tp > &points, CImgList< tf > &primitives)
 Polygonize an implicit 2D function by the marching squares algorithm.
void warn (const char *format,...)
int xln (const int x)
char uncase (const char x)
float atof (const char *str)
int strlen (const char *s)
int strncmp (const char *s1, const char *s2, const int l)
int strncasecmp (const char *s1, const char *s2, const int l)
int strcmp (const char *s1, const char *s2)
int strcasecmp (const char *s1, const char *s2)
int strfind (const char *s, const char c)
const char * basename (const char *s)
bool endian ()
 Return false for little endian CPUs (Intel), true for big endian CPUs (Motorola).
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, unsigned long &timer)
unsigned int wait (const unsigned int milliseconds)
 Wait for a certain number of milliseconds since the last call.
void srand ()
const char * filenamerand ()
void system (const char *command, const char *module_name=0)
void winformat_string (char *const)
const char * imagemagick_path ()
 Return path of the ImageMagick's convert tool.
const char * graphicsmagick_path ()
 Return path of the GraphicsMagick's gm tool.
const char * medcon_path ()
 Return path of the XMedcon tool.
const char * temporary_path ()
 Return path to store temporary files.
const char * filename_split (const char *const filename, char *const body=0)
char * filename_number (const char *const filename, const int number, const unsigned int n, char *const string)
std::FILE * fopen (const char *const path, const char *const mode)
int fclose (std::FILE *file)
template<typename T >
int fread (T *const ptr, const unsigned int nmemb, std::FILE *stream)
template<typename T >
int fwrite (const T *ptr, const unsigned int nmemb, std::FILE *stream)
template<typename T >
void swap (T &a, T &b)
template<typename T1 , typename T2 >
void swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2)
template<typename T1 , typename T2 , typename T3 >
void swap (T1 &a1, T1 &b1, T2 &a2, T2 &b2, T3 &a3, T3 &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)
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)
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)
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)
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)
template<typename T >
void endian_swap (T *const buffer, const unsigned int size)
template<typename T >
T & endian_swap (T &a)
const char * option (const char *const name, const int argc, char **argv, const char *defaut, const char *const usage=0)
bool option (const char *const name, const int argc, char **argv, const bool defaut, const char *const usage=0)
int option (const char *const name, const int argc, char **argv, const int defaut, const char *const usage=0)
char option (const char *const name, const int argc, char **argv, const char defaut, const char *const usage=0)
float option (const char *const name, const int argc, char **argv, const float defaut, const char *const usage=0)
double option (const char *const name, const int argc, char **argv, const double defaut, const char *const usage=0)
const char * argument (const unsigned int nb, const int argc, char **argv, const unsigned int nb_singles=0,...)
template<typename T >
const T rol (const T a, const unsigned int n=1)
template<typename T >
const T ror (const T a, const unsigned int n=1)
template<typename T >
abs (const T a)
 Return the absolute value of a.
bool abs (const bool a)
unsigned char abs (const unsigned char a)
unsigned short abs (const unsigned short a)
unsigned int abs (const unsigned int a)
unsigned long abs (const unsigned long a)
double abs (const double a)
float abs (const float a)
int abs (const int a)
template<typename T >
sqr (const T val)
template<typename t1 , typename t2 >
cimg::superset< t1, t2 >::type min (const t1 &a, const t2 &b)
 Return the minimum between a and b.
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 a,b and c.
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 a,b,c and d.
template<typename t1 , typename t2 >
cimg::superset< t1, t2 >::type max (const t1 &a, const t2 &b)
 Return the maximum between a and b.
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 a,b and c.
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 a,b,c and d.
template<typename T >
sign (const T x)
 Return the sign of x.
template<typename T >
unsigned long nearest_pow2 (const T x)
 Return the nearest power of 2 higher than x.
template<typename T >
mod (const T &x, const T &m)
 Return x modulo m (generic modulo).
int mod (const char x, const char m)
int mod (const short x, const short m)
int mod (const int x, const int m)
int mod (const long x, const long m)
int mod (const unsigned char x, const unsigned char m)
int mod (const unsigned short x, const unsigned short m)
int mod (const unsigned int x, const unsigned int m)
int mod (const unsigned long x, const unsigned long m)
template<typename T >
minmod (const T a, const T b)
 Return minmod(a,b).
double rand ()
 Return a random variable between [0,1], followin a uniform distribution.
double crand ()
 Return a random variable between [-1,1], following a uniform distribution.
double grand ()
 Return a random variable following a gaussian distribution and a standard deviation of 1.
double round (const double x, const double y, const unsigned int round_type=0)
 Return a rounded number.
double pythagore (double a, double b)
template<typename t >
int dialog (const char *title, const char *msg, const char *button1_txt, const char *button2_txt, const char *button3_txt, const char *button4_txt, const char *button5_txt, const char *button6_txt, const CImg< t > &logo, const bool centering=false)
 Display a dialog box, where a user can click standard buttons.
template<typename t >
int _marching_cubes_indice (const unsigned int edge, const CImg< t > &indices1, const CImg< t > &indices2, const unsigned int x, const unsigned int y, const unsigned int nx, const unsigned int ny)
template<typename t >
int _marching_squares_indice (const unsigned int edge, const CImg< t > &indices1, const CImg< t > &indices2, const unsigned int x, const unsigned int nx)

Variables

const char t_normal [] = { '\0' }
const char *const t_red = cimg::t_normal
const char *const *const t_bold = cimg::t_normal
const char *const *const *const t_purple = cimg::t_normal
const unsigned int keyESC = 1U
const unsigned int keyF1 = 2U
const unsigned int keyF2 = 3U
const unsigned int keyF3 = 4U
const unsigned int keyF4 = 5U
const unsigned int keyF5 = 6U
const unsigned int keyF6 = 7U
const unsigned int keyF7 = 8U
const unsigned int keyF8 = 9U
const unsigned int keyF9 = 10U
const unsigned int keyF10 = 11U
const unsigned int keyF11 = 12U
const unsigned int keyF12 = 13U
const unsigned int keyPAUSE = 14U
const unsigned int key1 = 15U
const unsigned int key2 = 16U
const unsigned int key3 = 17U
const unsigned int key4 = 18U
const unsigned int key5 = 19U
const unsigned int key6 = 20U
const unsigned int key7 = 21U
const unsigned int key8 = 22U
const unsigned int key9 = 23U
const unsigned int key0 = 24U
const unsigned int keyBACKSPACE = 25U
const unsigned int keyINSERT = 26U
const unsigned int keyHOME = 27U
const unsigned int keyPAGEUP = 28U
const unsigned int keyTAB = 29U
const unsigned int keyQ = 30U
const unsigned int keyW = 31U
const unsigned int keyE = 32U
const unsigned int keyR = 33U
const unsigned int keyT = 34U
const unsigned int keyY = 35U
const unsigned int keyU = 36U
const unsigned int keyI = 37U
const unsigned int keyO = 38U
const unsigned int keyP = 39U
const unsigned int keyDELETE = 40U
const unsigned int keyEND = 41U
const unsigned int keyPAGEDOWN = 42U
const unsigned int keyCAPSLOCK = 43U
const unsigned int keyA = 44U
const unsigned int keyS = 45U
const unsigned int keyD = 46U
const unsigned int keyF = 47U
const unsigned int keyG = 48U
const unsigned int keyH = 49U
const unsigned int keyJ = 50U
const unsigned int keyK = 51U
const unsigned int keyL = 52U
const unsigned int keyENTER = 53U
const unsigned int keySHIFTLEFT = 54U
const unsigned int keyZ = 55U
const unsigned int keyX = 56U
const unsigned int keyC = 57U
const unsigned int keyV = 58U
const unsigned int keyB = 59U
const unsigned int keyN = 60U
const unsigned int keyM = 61U
const unsigned int keySHIFTRIGHT = 62U
const unsigned int keyARROWUP = 63U
const unsigned int keyCTRLLEFT = 64U
const unsigned int keyAPPLEFT = 65U
const unsigned int keySPACE = 66U
const unsigned int keyALTGR = 67U
const unsigned int keyAPPRIGHT = 68U
const unsigned int keyMENU = 69U
const unsigned int keyCTRLRIGHT = 70U
const unsigned int keyARROWLEFT = 71U
const unsigned int keyARROWDOWN = 72U
const unsigned int keyARROWRIGHT = 73U
const unsigned int keyPAD0 = 74U
const unsigned int keyPAD1 = 75U
const unsigned int keyPAD2 = 76U
const unsigned int keyPAD3 = 77U
const unsigned int keyPAD4 = 78U
const unsigned int keyPAD5 = 79U
const unsigned int keyPAD6 = 80U
const unsigned int keyPAD7 = 81U
const unsigned int keyPAD8 = 82U
const unsigned int keyPAD9 = 83U
const unsigned int keyPADADD = 84U
const unsigned int keyPADSUB = 85U
const unsigned int keyPADMUL = 86U
const unsigned int keyPADDIV = 87U
const double valuePI = 3.14159265358979323846
 Definition of the mathematical constant PI.
const unsigned int font7x11 [7 *11 *256/32]
const unsigned int font10x13 [256 *10 *13/32]
const unsigned int font8x17 [8 *17 *256/32]
const unsigned int font10x19 [10 *19 *256/32]
const unsigned int font12x24 [12 *24 *256/32]
const unsigned int font16x32 [16 *32 *256/32]
const unsigned int font19x38 [19 *38 *256/32]
const unsigned int font29x57 [29 *57 *256/32]
const unsigned char logo40x38 [4576]

Detailed Description

Namespace that encompasses low-level functions and variables of the CImg Library.

Most of the functions and variables within this namespace are used by the library for low-level processing. Nevertheless, documented variables and functions of this namespace may be used safely in your own source code.

Warning:
Never write using namespace cimg_library::cimg; in your source code, since a lot of functions of the cimg:: namespace have prototypes similar to standard C functions defined in the global namespace ::.

Function Documentation

template<typename t >
int cimg_library::cimg::_marching_cubes_indice ( const unsigned int  edge,
const CImg< t > &  indices1,
const CImg< t > &  indices2,
const unsigned int  x,
const unsigned int  y,
const unsigned int  nx,
const unsigned int  ny 
) [inline]

Definition at line 31784 of file cimg.h.

Referenced by marching_cubes().

template<typename t >
int cimg_library::cimg::_marching_squares_indice ( const unsigned int  edge,
const CImg< t > &  indices1,
const CImg< t > &  indices2,
const unsigned int  x,
const unsigned int  nx 
) [inline]

Definition at line 32085 of file cimg.h.

Referenced by marching_squares().

int cimg_library::cimg::abs ( const int  a  )  [inline]

Definition at line 5210 of file cimg.h.

References abs().

float cimg_library::cimg::abs ( const float  a  )  [inline]

Definition at line 5206 of file cimg.h.

double cimg_library::cimg::abs ( const double  a  )  [inline]

Definition at line 5202 of file cimg.h.

unsigned long cimg_library::cimg::abs ( const unsigned long  a  )  [inline]

Definition at line 5198 of file cimg.h.

unsigned int cimg_library::cimg::abs ( const unsigned int  a  )  [inline]

Definition at line 5194 of file cimg.h.

unsigned short cimg_library::cimg::abs ( const unsigned short  a  )  [inline]

Definition at line 5190 of file cimg.h.

unsigned char cimg_library::cimg::abs ( const unsigned char  a  )  [inline]

Definition at line 5186 of file cimg.h.

bool cimg_library::cimg::abs ( const bool  a  )  [inline]

Definition at line 5182 of file cimg.h.

template<typename T >
T cimg_library::cimg::abs ( const T  a  )  [inline]
const char* cimg_library::cimg::argument ( const unsigned int  nb,
const int  argc,
char **  argv,
const unsigned int  nb_singles = 0,
  ... 
) [inline]

Definition at line 5153 of file cimg.h.

References option(), and strcasecmp().

float cimg_library::cimg::atof ( const char *  str  )  [inline]

Definition at line 4361 of file cimg.h.

Referenced by option().

const char* cimg_library::cimg::basename ( const char *  s  )  [inline]

Definition at line 4406 of file cimg.h.

References cimg_OS, and strfind().

Referenced by option(), and cimg_library::CImg< T >::save_cpp().

double cimg_library::cimg::crand (  )  [inline]

Return a random variable between [-1,1], following a uniform distribution.

Definition at line 5326 of file cimg.h.

References rand().

Referenced by cimg_library::CImg< T >::noise().

template<typename t >
int cimg_library::cimg::dialog ( const char *  title,
const char *  msg,
const char *  button1_txt,
const char *  button2_txt,
const char *  button3_txt,
const char *  button4_txt,
const char *  button5_txt,
const char *  button6_txt,
const CImg< t > &  logo,
const bool  centering = false 
) [inline]

Display a dialog box, where a user can click standard buttons.

Up to 6 buttons can be defined in the dialog window. This function returns when a user clicked one of the button or closed the dialog window.

Parameters:
title = Title of the dialog window.
msg = Main message displayed inside the dialog window.
button1_txt = Label of the 1st button.
button2_txt = Label of the 2nd button.
button3_txt = Label of the 3rd button.
button4_txt = Label of the 4th button.
button5_txt = Label of the 5th button.
button6_txt = Label of the 6th button.
logo = Logo image displayed at the left of the main message. This parameter is optional.
centering = Tell to center the dialog window on the screen.
Returns:
The button number (from 0 to 5), or -1 if the dialog window has been closed by the user.
Note:
If a button text is set to 0, then the corresponding button (and the followings) won't appear in the dialog box. At least one button is necessary.

Definition at line 31639 of file cimg.h.

References cimg_library::CImgDisplay::button, cimglist_for, cimg_library::CImg< T >::data, cimg_library::CImgDisplay::dimx(), cimg_library::CImg< T >::dimx(), cimg_library::CImgDisplay::dimy(), cimg_library::CImg< T >::dimy(), cimg_library::CImg< T >::display(), cimg_library::CImg< T >::draw_image(), cimg_library::CImg< T >::draw_line(), cimg_library::CImg< T >::draw_rectangle(), cimg_library::CImg< T >::draw_text(), cimg_library::CImg< T >::height, cimg_library::CImgList< T >::insert(), cimg_library::CImgDisplay::is_closed, cimg_library::CImgDisplay::is_resized, cimg_library::CImgDisplay::key, keyARROWDOWN, keyARROWLEFT, keyARROWRIGHT, keyARROWUP, keyENTER, keyESC, keyTAB, cimg_library::CImg< T >::max(), cimg_library::CImgDisplay::mouse_x, cimg_library::CImgDisplay::mouse_y, cimg_library::CImgDisplay::move(), cimg_library::CImgDisplay::resize(), cimg_library::CImgDisplay::screen_dimx(), cimg_library::CImgDisplay::screen_dimy(), cimg_library::CImgList< T >::size, cimg_library::CImgDisplay::wait(), and cimg_library::CImg< T >::width.

int cimg_library::cimg::dialog ( const char *  title,
const char *  msg,
const char *  button1_txt = "OK",
const char *  button2_txt = 0,
const char *  button3_txt = 0,
const char *  button4_txt = 0,
const char *  button5_txt = 0,
const char *  button6_txt = 0,
const bool  centering = false 
) [inline]

Definition at line 31774 of file cimg.h.

bool cimg_library::cimg::endian (  )  [inline]
template<typename T >
T& cimg_library::cimg::endian_swap ( T &  a  )  [inline]

Definition at line 5069 of file cimg.h.

References endian_swap().

template<typename T >
void cimg_library::cimg::endian_swap ( T *const   buffer,
const unsigned int  size 
) [inline]
unsigned int & cimg_library::cimg::exception_mode (  )  [inline]
int cimg_library::cimg::fclose ( std::FILE *  file  )  [inline]

Definition at line 4966 of file cimg.h.

References warn().

Referenced by cimg_library::CImg< T >::display_object3d(), cimg_library::CImg< T >::get_coordinates(), graphicsmagick_path(), imagemagick_path(), cimg_library::CImg< T >::load_analyze(), cimg_library::CImg< T >::load_ascii(), cimg_library::CImg< T >::load_bmp(), cimg_library::CImgList< T >::load_cimg(), cimg_library::CImg< T >::load_dlm(), cimg_library::CImgList< T >::load_ffmpeg_external(), cimg_library::CImg< T >::load_graphicsmagick_external(), cimg_library::CImg< T >::load_imagemagick_external(), cimg_library::CImg< T >::load_inr(), cimg_library::CImg< T >::load_jpeg(), cimg_library::CImg< T >::load_medcon_external(), cimg_library::CImg< T >::load_off(), cimg_library::CImg< T >::load_pandore(), cimg_library::CImgList< T >::load_parrec(), cimg_library::CImg< T >::load_png(), cimg_library::CImg< T >::load_pnm(), cimg_library::CImg< T >::load_raw(), cimg_library::CImg< T >::load_rgb(), cimg_library::CImg< T >::load_rgba(), cimg_library::CImgList< T >::load_yuv(), lux::lux_png_error(), medcon_path(), ParseFile(), cimg_library::CImg< T >::save_analyze(), cimg_library::CImg< T >::save_ascii(), cimg_library::CImg< T >::save_bmp(), cimg_library::CImgList< T >::save_cimg(), cimg_library::CImg< T >::save_cpp(), cimg_library::CImg< T >::save_dlm(), cimg_library::CImgList< T >::save_empty_cimg(), cimg_library::CImgList< T >::save_ffmpeg_external(), cimg_library::CImg< T >::save_graphicsmagick_external(), cimg_library::CImg< T >::save_imagemagick_external(), cimg_library::CImg< T >::save_inr(), cimg_library::CImg< T >::save_jpeg(), cimg_library::CImg< T >::save_medcon_external(), cimg_library::CImg< T >::save_off(), cimg_library::CImg< T >::save_pandore(), cimg_library::CImg< T >::save_png(), cimg_library::CImg< T >::save_pnm(), cimg_library::CImg< T >::save_raw(), cimg_library::CImg< T >::save_rgb(), cimg_library::CImg< T >::save_rgba(), cimg_library::CImgList< T >::save_yuv(), and temporary_path().

char* cimg_library::cimg::filename_number ( const char *const   filename,
const int  number,
const unsigned int  n,
char *const   string 
) [inline]

Definition at line 4944 of file cimg.h.

References filename_split().

Referenced by cimg_library::CImgList< T >::save(), and cimg_library::CImg< T >::save().

const char* cimg_library::cimg::filename_split ( const char *const   filename,
char *const   body = 0 
) [inline]
const char* cimg_library::cimg::filenamerand (  )  [inline]
std::FILE* cimg_library::cimg::fopen ( const char *const   path,
const char *const   mode 
) [inline]

Definition at line 4954 of file cimg.h.

Referenced by cimg_library::CImg< T >::display_object3d(), cimg_library::CImg< T >::get_coordinates(), graphicsmagick_path(), imagemagick_path(), include_push(), cimg_library::CImg< T >::load_analyze(), cimg_library::CImg< T >::load_ascii(), cimg_library::CImg< T >::load_bmp(), cimg_library::CImgList< T >::load_cimg(), cimg_library::CImg< T >::load_dlm(), cimg_library::CImgList< T >::load_ffmpeg_external(), cimg_library::CImg< T >::load_graphicsmagick_external(), cimg_library::CImg< T >::load_imagemagick_external(), cimg_library::CImg< T >::load_inr(), cimg_library::CImg< T >::load_jpeg(), cimg_library::CImg< T >::load_medcon_external(), cimg_library::CImg< T >::load_off(), cimg_library::CImg< T >::load_pandore(), cimg_library::CImgList< T >::load_parrec(), cimg_library::CImg< T >::load_png(), cimg_library::CImg< T >::load_pnm(), cimg_library::CImg< T >::load_raw(), cimg_library::CImg< T >::load_rgb(), cimg_library::CImg< T >::load_rgba(), cimg_library::CImgList< T >::load_yuv(), lux::lux_png_error(), medcon_path(), ParseFile(), cimg_library::CImg< T >::save_analyze(), cimg_library::CImg< T >::save_ascii(), cimg_library::CImg< T >::save_bmp(), cimg_library::CImgList< T >::save_cimg(), cimg_library::CImg< T >::save_cpp(), cimg_library::CImg< T >::save_dlm(), cimg_library::CImgList< T >::save_empty_cimg(), cimg_library::CImgList< T >::save_ffmpeg_external(), cimg_library::CImg< T >::save_graphicsmagick_external(), cimg_library::CImg< T >::save_imagemagick_external(), cimg_library::CImg< T >::save_inr(), cimg_library::CImg< T >::save_jpeg(), cimg_library::CImg< T >::save_medcon_external(), cimg_library::CImg< T >::save_off(), cimg_library::CImg< T >::save_pandore(), cimg_library::CImg< T >::save_png(), cimg_library::CImg< T >::save_pnm(), cimg_library::CImg< T >::save_raw(), cimg_library::CImg< T >::save_rgb(), cimg_library::CImg< T >::save_rgba(), cimg_library::CImgList< T >::save_yuv(), and temporary_path().

template<typename T >
int cimg_library::cimg::fread ( T *const   ptr,
const unsigned int  nmemb,
std::FILE *  stream 
) [inline]
template<typename T >
int cimg_library::cimg::fwrite ( const T *  ptr,
const unsigned int  nmemb,
std::FILE *  stream 
) [inline]
double cimg_library::cimg::grand (  )  [inline]

Return a random variable following a gaussian distribution and a standard deviation of 1.

Definition at line 5331 of file cimg.h.

References cimg_library::log(), rand(), and cimg_library::sqrt().

Referenced by cimg_library::CImg< T >::draw_plasma(), and cimg_library::CImg< T >::noise().

const char* cimg_library::cimg::graphicsmagick_path (  )  [inline]

Return path of the GraphicsMagick's gm tool.

If you have installed the GraphicsMagick package in a standard directory, this function should return the correct path of the gm tool used by the CImg Library to load and save compressed image formats. Conversely, if the gm executable is not auto-detected by the function, you can define the macro cimg_graphicsmagick_path with the correct path of the gm executable, before including CImg.h in your program :

       #define cimg_graphicsmagick_path "/users/thatsme/local/bin/gm"
       #include "CImg.h"

       int main() {
         CImg<> img("my_image.jpg");     // Read a JPEG image file.
         return 0;
       }

Note that non compressed image formats can be read without installing ImageMagick.

See also:
temporary_path(), get_load_imagemagick_external(), load_imagemagick_external(), save_imagemagick_external().

Definition at line 4700 of file cimg.h.

References fclose(), fopen(), and winformat_string().

Referenced by info(), cimg_library::CImg< T >::load_graphicsmagick_external(), and cimg_library::CImg< T >::save_graphicsmagick_external().

const char* cimg_library::cimg::imagemagick_path (  )  [inline]

Return path of the ImageMagick's convert tool.

This function is used internally in imagemagick_path, graphicsmagick_path and medcon_path on Windows platforms If you have installed the ImageMagick package in a standard directory, this function should return the correct path of the convert tool used by the CImg Library to load and save compressed image formats. Conversely, if the convert executable is not auto-detected by the function, you can define the macro cimg_imagemagick_path with the correct path of the convert executable, before including CImg.h in your program :

       #define cimg_imagemagick_path "/users/thatsme/local/bin/convert"
       #include "CImg.h"

       int main() {
         CImg<> img("my_image.jpg");     // Read a JPEG image file.
         return 0;
       }

Note that non compressed image formats can be read without installing ImageMagick.

See also:
temporary_path(), get_load_imagemagick_external(), load_imagemagick_external(), save_imagemagick_external().

Definition at line 4576 of file cimg.h.

References fclose(), fopen(), and winformat_string().

Referenced by info(), cimg_library::CImg< T >::load_imagemagick_external(), and cimg_library::CImg< T >::save_imagemagick_external().

void cimg_library::cimg::info (  )  [inline]

Print informations about CImg environement variables.

Printing is done on the standard error output.

Definition at line 5362 of file cimg.h.

References cimg_debug, cimg_display_type, cimg_OS, cimg_use_jpeg, cimg_use_png, cimg_use_tiff, endian(), graphicsmagick_path(), imagemagick_path(), medcon_path(), t_bold, t_normal, t_purple, t_red, and temporary_path().

Referenced by lux::lux_png_error(), and main().

template<typename tfunc , typename tp , typename tf >
void cimg_library::cimg::marching_cubes ( const tfunc &  func,
const float  isovalue,
const float  x0,
const float  y0,
const float  z0,
const float  x1,
const float  y1,
const float  z1,
const float  resx,
const float  resy,
const float  resz,
CImgList< tp > &  points,
CImgList< tf > &  primitives,
const bool  invert_faces = false 
) [inline]
template<typename tfunc , typename tp , typename tf >
void cimg_library::cimg::marching_squares ( const tfunc &  func,
const float  isovalue,
const float  x0,
const float  y0,
const float  x1,
const float  y1,
const float  resx,
const float  resy,
CImgList< tp > &  points,
CImgList< tf > &  primitives 
) [inline]

Polygonize an implicit 2D function by the marching squares algorithm.

Definition at line 32098 of file cimg.h.

References _marching_squares_indice(), cimg_forX, cimg_library::CImg< T >::fill(), cimg_library::CImgList< T >::insert(), and cimg_library::CImgList< T >::size.

template<typename t1 , typename t2 , typename t3 , typename t4 >
cimg::superset3<t1,t2,t3,t4>::type cimg_library::cimg::max ( const t1 &  a,
const t2 &  b,
const t3 &  c,
const t4 &  d 
) [inline]

Return the maximum between a,b,c and d.

Definition at line 5251 of file cimg.h.

References max().

template<typename t1 , typename t2 , typename t3 >
cimg::superset2<t1,t2,t3>::type cimg_library::cimg::max ( const t1 &  a,
const t2 &  b,
const t3 &  c 
) [inline]

Return the maximum between a,b and c.

Definition at line 5244 of file cimg.h.

References max().

template<typename t1 , typename t2 >
cimg::superset<t1,t2>::type cimg_library::cimg::max ( const t1 &  a,
const t2 &  b 
) [inline]

Return the maximum between a and b.

Definition at line 5238 of file cimg.h.

Referenced by cimg_library::CImgDisplay::_fitscreen(), lux::ImageFilm::AddSample(), lux::FlexImageFilm::AddSample(), lux::ERPTSampler::AddSample(), MemoryArena::Alloc(), lux::BBox::BBox(), lux::BVHAccel::BuildHierarchy(), lux::UnsafeKdTreeAccel::buildTree(), lux::TaBRecKdTreeAccel::buildTree(), lux::MIPMapImpl< T, U >::clamp(), lux::CosineSampleHemisphere(), lux::PerspectiveCamera::CreateCamera(), lux::OrthoCamera::CreateCamera(), lux::EnvironmentCamera::CreateCamera(), lux::ImageFilm::CreateFilm(), lux::FlexImageFilm::CreateFilm(), cubic(), cimg_library::CImg< T >::cubic_pix2d(), lux::Cylinder::Cylinder(), cimg_library::CImg< T >::display(), cimg_library::CImg< T >::display_object3d(), cimg_library::CImg< T >::distance_function(), cimg_library::CImg< T >::draw_quiver(), lux::LuxGLViewer::DrawRulers(), lux::MachineEpsilon::E(), lux::IrregularFunction1D::Eval(), evalPath(), lux::TriangleFilter::Evaluate(), lux::FresnelGeneral::Evaluate(), lux::FresnelDielectric::Evaluate(), lux::Checkerboard2D< T >::Evaluate(), lux::OrenNayar::f(), lux::FresnelBlend::f(), lux::FlexImageFilm::FlexImageFilm(), lux::GaussianFilter::Gaussian(), generateEyePath(), generateLightPath(), lux::RealisticCamera::GenerateRay(), cimg_library::CImg< T >::get_displacement_field(), cimg_library::CImg< T >::get_identity_matrix(), lux::LowdiscrepancyPixelSampler::GetTotalPixels(), lux::Hyperboloid::Hyperboloid(), cimg_library::CImg< T >::identity_matrix(), lux::ImageFilm::ImageFilm(), lux::InfiniteAreaLightIS::InfiniteAreaLightIS(), lux::TaBRecKdTreeAccel::Intersect(), lux::AggregateVolume::IntersectP(), lux::IrregularDistribution1D::IrregularDistribution1D(), lux::IrregularSPD::IrregularSPD(), lux::LensComponent::LensComponent(), lux::BidirIntegrator::Li(), cimg_library::CImg< T >::load_tiff(), lux::MIPMapImpl< T, U >::Lookup(), lux::Histogram::MakeImage(), lux::MaxWhiteOp::Map(), lux::HighContrastOp::Map(), StatsCounter::Max(), max(), lux::Mesh::Mesh(), lux::MIPMapImpl< T, U >::MIPMapImpl(), lux::SPD::Normalize(), NURBSEvaluateSurface(), lux::TextureColor< T, colorSamples >::operator*(), lux::TextureColor< T, colorSamples >::operator*=(), lux::TextureColor< T, colorSamples >::operator+(), lux::TextureColor< T, colorSamples >::operator+=(), lux::Paraboloid::Paraboloid(), lux::Sphere::Pdf(), lux::Lafortune::Pdf(), quartic(), lux::DistributedPath::RequestSamples(), lux::rotateImage(), lux::Sphere::Sample(), lux::Distribution1D::Sample(), lux::WardIsotropic::Sample_f(), lux::SpecularTransmission::Sample_f(), lux::Lafortune::Sample_f(), lux::BRDFToBTDF::Sample_f(), lux::Blinn::Sample_f(), lux::Beckmann::Sample_f(), lux::Anisotropic::Sample_f(), lux::SkyLight::Sample_L(), lux::InfiniteAreaLight::Sample_L(), lux::SDEdge::SDEdge(), lux::VisibilityTester::SetSegment(), lux::LuxGLViewer::SetZoom(), cimg_library::CImg< T >::sharpen(), lux::SinTheta(), lux::Sphere::Sphere(), cimg_library::CImg< T >::SVD(), lux::Torus::Torus(), lux::Union(), ProgressReporter::Update(), lux::FlexImageFilm::UpdateFilm(), weightPath(), lux::SPD::Whitepoint(), and lux::FlexImageFilm::WriteEXRImage().

const char* cimg_library::cimg::medcon_path (  )  [inline]

Return path of the XMedcon tool.

If you have installed the XMedcon package in a standard directory, this function should return the correct path of the medcon tool used by the CIg Library to load DICOM image formats. Conversely, if the medcon executable is not auto-detected by the function, you can define the macro cimg_medcon_path with the correct path of the medcon executable, before including CImg.h in your program :

       #define cimg_medcon_path "/users/thatsme/local/bin/medcon"
       #include "CImg.h"

       int main() {
         CImg<> img("my_image.dcm");    // Read a DICOM image file.
         return 0;
       }

Note that medcon is only needed if you want to read DICOM image formats.

See also:
temporary_path(), get_load_medcon_external(), load_medcon_external().

Definition at line 4824 of file cimg.h.

References fclose(), fopen(), and winformat_string().

Referenced by info(), cimg_library::CImg< T >::load_medcon_external(), and cimg_library::CImg< T >::save_medcon_external().

template<typename t1 , typename t2 , typename t3 , typename t4 >
cimg::superset3<t1,t2,t3,t4>::type cimg_library::cimg::min ( const t1 &  a,
const t2 &  b,
const t3 &  c,
const t4 &  d 
) [inline]

Return the minimum between a,b,c and d.

Definition at line 5232 of file cimg.h.

References min().

template<typename t1 , typename t2 , typename t3 >
cimg::superset2<t1,t2,t3>::type cimg_library::cimg::min ( const t1 &  a,
const t2 &  b,
const t3 &  c 
) [inline]

Return the minimum between a,b and c.

Definition at line 5225 of file cimg.h.

References min().

template<typename t1 , typename t2 >
cimg::superset<t1,t2>::type cimg_library::cimg::min ( const t1 &  a,
const t2 &  b 
) [inline]

Return the minimum between a and b.

Definition at line 5219 of file cimg.h.

Referenced by cimg_library::CImg< T >::_draw_scanline(), lux::MetropolisSampler::AddSample(), lux::Metropolis::AddSample(), lux::ImageFilm::AddSample(), lux::FlexImageFilm::AddSample(), lux::ERPTSampler::AddSample(), lux::BBox::BBox(), lux::BVHAccel::BuildHierarchy(), lux::PerspectiveCamera::CreateCamera(), lux::OrthoCamera::CreateCamera(), lux::EnvironmentCamera::CreateCamera(), lux::ImageFilm::CreateFilm(), lux::FlexImageFilm::CreateFilm(), lux::LuxGLViewer::CreateTextures(), cubic(), cimg_library::CImg< T >::cubic_pix1d(), cimg_library::CImg< T >::cubic_pix2d(), lux::Cylinder::Cylinder(), cimg_library::CImg< T >::draw_triangle(), lux::Function1D::Eval(), evalPath(), lux::MIPMapImpl< T, U >::EWA(), lux::Microfacet::G(), lux::CookTorrance::G(), generateEyePath(), generateLightPath(), cimg_library::CImg< T >::get_coordinates(), cimg_library::CImg< T >::get_resize(), lux::EnvironmentCamera::GetSamplePosition(), lux::SkyLight::GetSkySpectralRadiance(), greycstoration_patch_run(), greycstoration_progress(), greycstoration_run(), lux::Hyperboloid::Hyperboloid(), lux::IESSphericalFunction::IESSphericalFunction(), lux::TaBRecKdTreeAccel::Intersect(), lux::AggregateVolume::IntersectP(), lux::LensComponent::LensComponent(), lux::SingleScattering::Li(), lux::MLTPathIntegrator::Li(), lux::IGIIntegrator::Li(), lux::ExPhotonIntegrator::Li(), lux::BidirIntegrator::Li(), cimg_library::CImg< T >::load_bmp(), cimg_library::CImg< T >::load_pnm(), cimg_library::CImg< T >::load_rgb(), cimg_library::CImg< T >::load_rgba(), lux::HighContrastOp::Map(), StatsCounter::Min(), min(), lux::LuxGLViewer::OnMouse(), lux::LuxGLViewer::OnPaint(), cimg_library::operator*(), lux::TextureColor< T, colorSamples >::operator-=(), lux::Paraboloid::Paraboloid(), lux::PhotonIntegrator::Preprocess(), lux::IGIIntegrator::Preprocess(), lux::ExPhotonIntegrator::Preprocess(), cimg_library::CImg< T >::quantize(), lux::SPD::sample(), lux::SunLight::Sample_L(), lux::SkyLight::Sample_L(), lux::InfiniteAreaLight::Sample_L(), lux::SDEdge::SDEdge(), cimg_library::CImg< T >::set_vector_at(), lux::VisibilityTester::SetSegment(), lux::LuxGLViewer::SetZoom(), lux::Sphere::Sphere(), lux::StatsPrintVal(), cimg_library::CImg< T >::SVD(), lux::Torus::Torus(), lux::Union(), and lux::FlexImageFilm::WriteEXRImage().

template<typename T >
T cimg_library::cimg::minmod ( const T  a,
const T  b 
) [inline]

Return minmod(a,b).

The operator minmod(a,b) is defined to be :

  • minmod(a,b) = min(a,b), if (a * b)>0.
  • minmod(a,b) = 0, if (a * b)<=0

Definition at line 5316 of file cimg.h.

Referenced by cimg_library::CImg< T >::sharpen().

int cimg_library::cimg::mod ( const unsigned long  x,
const unsigned long  m 
) [inline]

Definition at line 5306 of file cimg.h.

int cimg_library::cimg::mod ( const unsigned int  x,
const unsigned int  m 
) [inline]

Definition at line 5302 of file cimg.h.

int cimg_library::cimg::mod ( const unsigned short  x,
const unsigned short  m 
) [inline]

Definition at line 5298 of file cimg.h.

int cimg_library::cimg::mod ( const unsigned char  x,
const unsigned char  m 
) [inline]

Definition at line 5294 of file cimg.h.

int cimg_library::cimg::mod ( const long  x,
const long  m 
) [inline]

Definition at line 5290 of file cimg.h.

int cimg_library::cimg::mod ( const int  x,
const int  m 
) [inline]

Definition at line 5286 of file cimg.h.

int cimg_library::cimg::mod ( const short  x,
const short  m 
) [inline]

Definition at line 5282 of file cimg.h.

int cimg_library::cimg::mod ( const char  x,
const char  m 
) [inline]

Definition at line 5278 of file cimg.h.

template<typename T >
T cimg_library::cimg::mod ( const T &  x,
const T &  m 
) [inline]

Return x modulo m (generic modulo).

This modulo function accepts negative and floating-points modulo numbers m.

Definition at line 5272 of file cimg.h.

Referenced by cimg_library::CImg< T >::draw_grid(), cimg_library::CImg< T >::get_rotate(), cimg_library::CImg< T >::operator%=(), round(), and cimg_library::CImg< T >::translate().

template<typename T >
unsigned long cimg_library::cimg::nearest_pow2 ( const T  x  )  [inline]

Return the nearest power of 2 higher than x.

Definition at line 5262 of file cimg.h.

Referenced by cimg_library::CImgList< T >::assign(), and cimg_library::CImgList< T >::CImgList().

double cimg_library::cimg::option ( const char *const   name,
const int  argc,
char **  argv,
const double  defaut,
const char *const   usage = 0 
) [inline]

Definition at line 5143 of file cimg.h.

References atof(), and option().

float cimg_library::cimg::option ( const char *const   name,
const int  argc,
char **  argv,
const float  defaut,
const char *const   usage = 0 
) [inline]

Definition at line 5133 of file cimg.h.

References atof(), and option().

char cimg_library::cimg::option ( const char *const   name,
const int  argc,
char **  argv,
const char  defaut,
const char *const   usage = 0 
) [inline]

Definition at line 5122 of file cimg.h.

References option().

int cimg_library::cimg::option ( const char *const   name,
const int  argc,
char **  argv,
const int  defaut,
const char *const   usage = 0 
) [inline]

Definition at line 5112 of file cimg.h.

References option().

bool cimg_library::cimg::option ( const char *const   name,
const int  argc,
char **  argv,
const bool  defaut,
const char *const   usage = 0 
) [inline]

Definition at line 5104 of file cimg.h.

References option(), and strcasecmp().

const char* cimg_library::cimg::option ( const char *const   name,
const int  argc,
char **  argv,
const char *  defaut,
const char *const   usage = 0 
) [inline]

Definition at line 5074 of file cimg.h.

References basename(), strcmp(), t_bold, t_normal, t_purple, and t_red.

Referenced by argument(), option(), and lux::RenderFarm::updateFilm().

double cimg_library::cimg::pythagore ( double  a,
double  b 
) [inline]

Definition at line 5352 of file cimg.h.

References abs(), and cimg_library::sqrt().

Referenced by cimg_library::CImg< T >::SVD().

double cimg_library::cimg::rand (  )  [inline]
template<typename T >
const T cimg_library::cimg::rol ( const T  a,
const unsigned int  n = 1 
) [inline]

Definition at line 5169 of file cimg.h.

template<typename T >
const T cimg_library::cimg::ror ( const T  a,
const unsigned int  n = 1 
) [inline]

Definition at line 5173 of file cimg.h.

Referenced by cimg_library::CImg< T >::load_bmp().

double cimg_library::cimg::round ( const double  x,
const double  y,
const unsigned int  round_type = 0 
) [inline]

Return a rounded number.

Definition at line 5342 of file cimg.h.

References mod().

Referenced by cimg_library::CImg< T >::round().

template<typename T >
T cimg_library::cimg::sign ( const T  x  )  [inline]

Return the sign of x.

Definition at line 5257 of file cimg.h.

Referenced by cimg_library::CImg< T >::distance_function(), cimg_library::CImg< T >::sharpen(), and lux::Quaternion::Slerp().

void cimg_library::cimg::sleep ( const unsigned int  milliseconds  )  [inline]

Sleep for a certain numbers of milliseconds.

This function frees the CPU ressources during the sleeping time. It may be used to temporize your program properly, without wasting CPU time.

See also:
wait(), time().

Definition at line 4437 of file cimg.h.

Referenced by infoThread(), main(), printInfoThread(), lux::RenderThread::render(), lux::NetworkRenderServerThread::run(), lux::FilmUpdaterThread::updateFilm(), and wait().

template<typename T >
T cimg_library::cimg::sqr ( const T  val  )  [inline]

Definition at line 5214 of file cimg.h.

void cimg_library::cimg::srand (  )  [inline]
int cimg_library::cimg::strcasecmp ( const char *  s1,
const char *  s2 
) [inline]
int cimg_library::cimg::strcmp ( const char *  s1,
const char *  s2 
) [inline]

Definition at line 4385 of file cimg.h.

References strlen(), and strncmp().

Referenced by option(), and ParseFile().

int cimg_library::cimg::strfind ( const char *  s,
const char  c 
) [inline]

Definition at line 4397 of file cimg.h.

References strlen().

Referenced by basename(), and filename_split().

int cimg_library::cimg::strlen ( const char *  s  )  [inline]
int cimg_library::cimg::strncasecmp ( const char *  s1,
const char *  s2,
const int  l 
) [inline]
int cimg_library::cimg::strncmp ( const char *  s1,
const char *  s2,
const int  l 
) [inline]
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 >
void cimg_library::cimg::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 
) [inline]

Definition at line 5040 of file cimg.h.

References swap().

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 >
void cimg_library::cimg::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 
) [inline]

Definition at line 5034 of file cimg.h.

References swap().

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 >
void cimg_library::cimg::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 
) [inline]

Definition at line 5029 of file cimg.h.

References swap().

template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 >
void cimg_library::cimg::swap ( T1 &  a1,
T1 &  b1,
T2 &  a2,
T2 &  b2,
T3 &  a3,
T3 &  b3,
T4 &  a4,
T4 &  b4,
T5 &  a5,
T5 &  b5 
) [inline]

Definition at line 5024 of file cimg.h.

References swap().

template<typename T1 , typename T2 , typename T3 , typename T4 >
void cimg_library::cimg::swap ( T1 &  a1,
T1 &  b1,
T2 &  a2,
T2 &  b2,
T3 &  a3,
T3 &  b3,
T4 &  a4,
T4 &  b4 
) [inline]

Definition at line 5019 of file cimg.h.

References swap().

template<typename T1 , typename T2 , typename T3 >
void cimg_library::cimg::swap ( T1 &  a1,
T1 &  b1,
T2 &  a2,
T2 &  b2,
T3 &  a3,
T3 &  b3 
) [inline]

Definition at line 5014 of file cimg.h.

References swap().

template<typename T1 , typename T2 >
void cimg_library::cimg::swap ( T1 &  a1,
T1 &  b1,
T2 &  a2,
T2 &  b2 
) [inline]

Definition at line 5010 of file cimg.h.

References swap().

template<typename T >
void cimg_library::cimg::swap ( T &  a,
T &  b 
) [inline]
void cimg_library::cimg::system ( const char *  command,
const char *  module_name = 0 
) [inline]
const char* cimg_library::cimg::temporary_path (  )  [inline]

Return path to store temporary files.

If you are running on a standard Unix or Windows system, this function should return a correct path where temporary files can be stored. If such a path is not auto-detected by this function, you can define the macro cimg_temporary_path with a correct path, before including CImg.h in your program :

       #define cimg_temporary_path "/users/thatsme/tmp"
       #include "CImg.h"

       int main() {
         CImg<> img("my_image.jpg");   // Read a JPEG image file (using the defined temporay path).
         return 0;
       }

A temporary path is necessary to load and save compressed image formats, using convert or medcon.

See also:
imagemagick_path(), get_load_imagemagick_external(), load_imagemagick_external(), save_imagemagick_external(), get_load_medcon_external(), load_medcon_external().

Definition at line 4887 of file cimg.h.

References cimg_test_temporary_path, fclose(), filenamerand(), fopen(), cimg_library::remove(), and winformat_string().

Referenced by info(), cimg_library::CImgList< T >::load_ffmpeg_external(), cimg_library::CImg< T >::load_graphicsmagick_external(), cimg_library::CImg< T >::load_imagemagick_external(), cimg_library::CImgList< T >::save_ffmpeg_external(), cimg_library::CImg< T >::save_graphicsmagick_external(), and cimg_library::CImg< T >::save_imagemagick_external().

unsigned long cimg_library::cimg::time (  )  [inline]
char cimg_library::cimg::uncase ( const char  x  )  [inline]
unsigned int cimg_library::cimg::wait ( const unsigned int  milliseconds  )  [inline]

Wait for a certain number of milliseconds since the last call.

This function is equivalent to sleep() but the waiting time is computed with regard to the last call of wait(). It may be used to temporize your program properly.

See also:
sleep(), time().

Definition at line 4464 of file cimg.h.

References time(), and wait().

unsigned int cimg_library::cimg::wait ( const unsigned int  milliseconds,
unsigned long &  timer 
) [inline]

Definition at line 4448 of file cimg.h.

References sleep(), and time().

Referenced by greycstoration_stop(), if(), and wait().

void cimg_library::cimg::warn ( const char *  format,
  ... 
) [inline]
void cimg_library::cimg::winformat_string ( char *  const  )  [inline]

Definition at line 4525 of file cimg.h.

Referenced by graphicsmagick_path(), imagemagick_path(), medcon_path(), and temporary_path().

int cimg_library::cimg::xln ( const int  x  )  [inline]

Definition at line 4351 of file cimg.h.

References cimg_library::log10().


Variable Documentation

const unsigned int cimg_library::cimg::font10x13[256 *10 *13/32]

Definition at line 2673 of file cimg.h.

Referenced by cimg_library::CImgList< T >::get_font().

const unsigned int cimg_library::cimg::font10x19[10 *19 *256/32]

Definition at line 2803 of file cimg.h.

Referenced by cimg_library::CImgList< T >::get_font().

const unsigned int cimg_library::cimg::font12x24[12 *24 *256/32]

Definition at line 2898 of file cimg.h.

Referenced by cimg_library::CImgList< T >::get_font().

const unsigned int cimg_library::cimg::font16x32[16 *32 *256/32]

Definition at line 3037 of file cimg.h.

Referenced by cimg_library::CImgList< T >::get_font().

const unsigned int cimg_library::cimg::font19x38[19 *38 *256/32]

Definition at line 3271 of file cimg.h.

Referenced by cimg_library::CImgList< T >::get_font().

const unsigned int cimg_library::cimg::font29x57[29 *57 *256/32]

Definition at line 3597 of file cimg.h.

Referenced by cimg_library::CImgList< T >::get_font().

const unsigned int cimg_library::cimg::font7x11[7 *11 *256/32]

Definition at line 2632 of file cimg.h.

Referenced by cimg_library::CImgList< T >::get_font().

const unsigned int cimg_library::cimg::font8x17[8 *17 *256/32]

Definition at line 2736 of file cimg.h.

Referenced by cimg_library::CImgList< T >::get_font().

const unsigned int cimg_library::cimg::key0 = 24U

Definition at line 2563 of file cimg.h.

const unsigned int cimg_library::cimg::key1 = 15U

Definition at line 2554 of file cimg.h.

const unsigned int cimg_library::cimg::key2 = 16U

Definition at line 2555 of file cimg.h.

const unsigned int cimg_library::cimg::key3 = 17U

Definition at line 2556 of file cimg.h.

const unsigned int cimg_library::cimg::key4 = 18U

Definition at line 2557 of file cimg.h.

const unsigned int cimg_library::cimg::key5 = 19U

Definition at line 2558 of file cimg.h.

const unsigned int cimg_library::cimg::key6 = 20U

Definition at line 2559 of file cimg.h.

const unsigned int cimg_library::cimg::key7 = 21U

Definition at line 2560 of file cimg.h.

const unsigned int cimg_library::cimg::key8 = 22U

Definition at line 2561 of file cimg.h.

const unsigned int cimg_library::cimg::key9 = 23U

Definition at line 2562 of file cimg.h.

const unsigned int cimg_library::cimg::keyA = 44U

Definition at line 2583 of file cimg.h.

const unsigned int cimg_library::cimg::keyALTGR = 67U

Definition at line 2606 of file cimg.h.

const unsigned int cimg_library::cimg::keyAPPLEFT = 65U

Definition at line 2604 of file cimg.h.

const unsigned int cimg_library::cimg::keyAPPRIGHT = 68U

Definition at line 2607 of file cimg.h.

const unsigned int cimg_library::cimg::keyARROWDOWN = 72U

Definition at line 2611 of file cimg.h.

Referenced by dialog(), and cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyARROWLEFT = 71U

Definition at line 2610 of file cimg.h.

Referenced by dialog(), and cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyARROWRIGHT = 73U

Definition at line 2612 of file cimg.h.

Referenced by dialog(), and cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyARROWUP = 63U

Definition at line 2602 of file cimg.h.

Referenced by dialog(), and cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyB = 59U

Definition at line 2598 of file cimg.h.

const unsigned int cimg_library::cimg::keyBACKSPACE = 25U

Definition at line 2564 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyC = 57U
const unsigned int cimg_library::cimg::keyCAPSLOCK = 43U

Definition at line 2582 of file cimg.h.

const unsigned int cimg_library::cimg::keyCTRLLEFT = 64U
const unsigned int cimg_library::cimg::keyCTRLRIGHT = 70U

Definition at line 2609 of file cimg.h.

Referenced by cimg_library::CImg< T >::display_object3d().

const unsigned int cimg_library::cimg::keyD = 46U
const unsigned int cimg_library::cimg::keyDELETE = 40U

Definition at line 2579 of file cimg.h.

const unsigned int cimg_library::cimg::keyE = 32U

Definition at line 2571 of file cimg.h.

const unsigned int cimg_library::cimg::keyEND = 41U

Definition at line 2580 of file cimg.h.

const unsigned int cimg_library::cimg::keyENTER = 53U

Definition at line 2592 of file cimg.h.

Referenced by dialog().

const unsigned int cimg_library::cimg::keyESC = 1U

Definition at line 2540 of file cimg.h.

Referenced by dialog().

const unsigned int cimg_library::cimg::keyF = 47U
const unsigned int cimg_library::cimg::keyF1 = 2U

Definition at line 2541 of file cimg.h.

const unsigned int cimg_library::cimg::keyF10 = 11U

Definition at line 2550 of file cimg.h.

const unsigned int cimg_library::cimg::keyF11 = 12U

Definition at line 2551 of file cimg.h.

const unsigned int cimg_library::cimg::keyF12 = 13U

Definition at line 2552 of file cimg.h.

const unsigned int cimg_library::cimg::keyF2 = 3U

Definition at line 2542 of file cimg.h.

const unsigned int cimg_library::cimg::keyF3 = 4U

Definition at line 2543 of file cimg.h.

const unsigned int cimg_library::cimg::keyF4 = 5U

Definition at line 2544 of file cimg.h.

const unsigned int cimg_library::cimg::keyF5 = 6U

Definition at line 2545 of file cimg.h.

const unsigned int cimg_library::cimg::keyF6 = 7U

Definition at line 2546 of file cimg.h.

const unsigned int cimg_library::cimg::keyF7 = 8U

Definition at line 2547 of file cimg.h.

const unsigned int cimg_library::cimg::keyF8 = 9U

Definition at line 2548 of file cimg.h.

const unsigned int cimg_library::cimg::keyF9 = 10U

Definition at line 2549 of file cimg.h.

const unsigned int cimg_library::cimg::keyG = 48U

Definition at line 2587 of file cimg.h.

const unsigned int cimg_library::cimg::keyH = 49U

Definition at line 2588 of file cimg.h.

const unsigned int cimg_library::cimg::keyHOME = 27U

Definition at line 2566 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyI = 37U

Definition at line 2576 of file cimg.h.

const unsigned int cimg_library::cimg::keyINSERT = 26U

Definition at line 2565 of file cimg.h.

const unsigned int cimg_library::cimg::keyJ = 50U

Definition at line 2589 of file cimg.h.

const unsigned int cimg_library::cimg::keyK = 51U

Definition at line 2590 of file cimg.h.

const unsigned int cimg_library::cimg::keyL = 52U

Definition at line 2591 of file cimg.h.

const unsigned int cimg_library::cimg::keyM = 61U

Definition at line 2600 of file cimg.h.

const unsigned int cimg_library::cimg::keyMENU = 69U

Definition at line 2608 of file cimg.h.

const unsigned int cimg_library::cimg::keyN = 60U

Definition at line 2599 of file cimg.h.

const unsigned int cimg_library::cimg::keyO = 38U
const unsigned int cimg_library::cimg::keyP = 39U

Definition at line 2578 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD0 = 74U

Definition at line 2613 of file cimg.h.

const unsigned int cimg_library::cimg::keyPAD1 = 75U

Definition at line 2614 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD2 = 76U

Definition at line 2615 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD3 = 77U

Definition at line 2616 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD4 = 78U

Definition at line 2617 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD5 = 79U

Definition at line 2618 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD6 = 80U

Definition at line 2619 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD7 = 81U

Definition at line 2620 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD8 = 82U

Definition at line 2621 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAD9 = 83U

Definition at line 2622 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPADADD = 84U

Definition at line 2623 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPADDIV = 87U

Definition at line 2626 of file cimg.h.

const unsigned int cimg_library::cimg::keyPADMUL = 86U

Definition at line 2625 of file cimg.h.

const unsigned int cimg_library::cimg::keyPADSUB = 85U

Definition at line 2624 of file cimg.h.

Referenced by cimg_library::CImg< T >::display().

const unsigned int cimg_library::cimg::keyPAGEDOWN = 42U
const unsigned int cimg_library::cimg::keyPAGEUP = 28U
const unsigned int cimg_library::cimg::keyPAUSE = 14U

Definition at line 2553 of file cimg.h.

const unsigned int cimg_library::cimg::keyQ = 30U

Definition at line 2569 of file cimg.h.

const unsigned int cimg_library::cimg::keyR = 33U
const unsigned int cimg_library::cimg::keyS = 45U
const unsigned int cimg_library::cimg::keySHIFTLEFT = 54U

Definition at line 2593 of file cimg.h.

const unsigned int cimg_library::cimg::keySHIFTRIGHT = 62U

Definition at line 2601 of file cimg.h.

const unsigned int cimg_library::cimg::keySPACE = 66U

Definition at line 2605 of file cimg.h.

const unsigned int cimg_library::cimg::keyT = 34U

Definition at line 2573 of file cimg.h.

const unsigned int cimg_library::cimg::keyTAB = 29U

Definition at line 2568 of file cimg.h.

Referenced by dialog().

const unsigned int cimg_library::cimg::keyU = 36U

Definition at line 2575 of file cimg.h.

const unsigned int cimg_library::cimg::keyV = 58U

Definition at line 2597 of file cimg.h.

const unsigned int cimg_library::cimg::keyW = 31U

Definition at line 2570 of file cimg.h.

const unsigned int cimg_library::cimg::keyX = 56U

Definition at line 2595 of file cimg.h.

const unsigned int cimg_library::cimg::keyY = 35U

Definition at line 2574 of file cimg.h.

const unsigned int cimg_library::cimg::keyZ = 55U

Definition at line 2594 of file cimg.h.

const unsigned char cimg_library::cimg::logo40x38[4576]
Initial value:
 {
      177,200,200,200,3,123,123,0,36,200,200,200,1,123,123,0,2,255,255,0,1,189,189,189,1,0,0,0,34,200,200,200,
      1,123,123,0,4,255,255,0,1,189,189,189,1,0,0,0,1,123,123,123,32,200,200,200,1,123,123,0,5,255,255,0,1,0,0,
      0,2,123,123,123,30,200,200,200,1,123,123,0,6,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,29,200,200,200,
      1,123,123,0,7,255,255,0,1,0,0,0,2,123,123,123,28,200,200,200,1,123,123,0,8,255,255,0,1,189,189,189,1,0,0,0,
      2,123,123,123,27,200,200,200,1,123,123,0,9,255,255,0,1,0,0,0,2,123,123,123,26,200,200,200,1,123,123,0,10,255,
      255,0,1,189,189,189,1,0,0,0,2,123,123,123,25,200,200,200,1,123,123,0,3,255,255,0,1,189,189,189,3,0,0,0,1,189,
      189,189,3,255,255,0,1,0,0,0,2,123,123,123,24,200,200,200,1,123,123,0,4,255,255,0,5,0,0,0,3,255,255,0,1,189,
      189,189,1,0,0,0,2,123,123,123,23,200,200,200,1,123,123,0,4,255,255,0,5,0,0,0,4,255,255,0,1,0,0,0,2,123,123,123,
      22,200,200,200,1,123,123,0,5,255,255,0,5,0,0,0,4,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,21,200,200,200,
      1,123,123,0,5,255,255,0,5,0,0,0,5,255,255,0,1,0,0,0,2,123,123,123,20,200,200,200,1,123,123,0,6,255,255,0,5,0,0,
      0,5,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,19,200,200,200,1,123,123,0,6,255,255,0,1,123,123,0,3,0,0,0,1,
      123,123,0,6,255,255,0,1,0,0,0,2,123,123,123,18,200,200,200,1,123,123,0,7,255,255,0,1,189,189,189,3,0,0,0,1,189,
      189,189,6,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,17,200,200,200,1,123,123,0,8,255,255,0,3,0,0,0,8,255,255,
      0,1,0,0,0,2,123,123,123,16,200,200,200,1,123,123,0,9,255,255,0,1,123,123,0,1,0,0,0,1,123,123,0,8,255,255,0,1,189,
      189,189,1,0,0,0,2,123,123,123,15,200,200,200,1,123,123,0,9,255,255,0,1,189,189,189,1,0,0,0,1,189,189,189,9,255,255,
      0,1,0,0,0,2,123,123,123,14,200,200,200,1,123,123,0,11,255,255,0,1,0,0,0,10,255,255,0,1,189,189,189,1,0,0,0,2,123,
      123,123,13,200,200,200,1,123,123,0,23,255,255,0,1,0,0,0,2,123,123,123,12,200,200,200,1,123,123,0,11,255,255,0,1,189,
      189,189,2,0,0,0,1,189,189,189,9,255,255,0,1,189,189,189,1,0,0,0,2,123,123,123,11,200,200,200,1,123,123,0,11,255,255,
      0,4,0,0,0,10,255,255,0,1,0,0,0,2,123,123,123,10,200,200,200,1,123,123,0,12,255,255,0,4,0,0,0,10,255,255,0,1,189,189,
      189,1,0,0,0,2,123,123,123,9,200,200,200,1,123,123,0,12,255,255,0,1,189,189,189,2,0,0,0,1,189,189,189,11,255,255,0,1,
      0,0,0,2,123,123,123,9,200,200,200,1,123,123,0,27,255,255,0,1,0,0,0,3,123,123,123,8,200,200,200,1,123,123,0,26,255,
      255,0,1,189,189,189,1,0,0,0,3,123,123,123,9,200,200,200,1,123,123,0,24,255,255,0,1,189,189,189,1,0,0,0,4,123,123,
      123,10,200,200,200,1,123,123,0,24,0,0,0,5,123,123,123,12,200,200,200,27,123,123,123,14,200,200,200,25,123,123,123,86,
      200,200,200,91,49,124,118,124,71,32,124,95,49,56,114,52,82,121,0}

Definition at line 4308 of file cimg.h.

Referenced by cimg_library::CImg< T >::get_logo40x38().

const char* const * const cimg_library::cimg::t_bold = cimg::t_normal

Definition at line 2265 of file cimg.h.

Referenced by info(), and option().

const char cimg_library::cimg::t_normal[] = { '\0' }

Definition at line 2264 of file cimg.h.

Referenced by info(), and option().

const char* const * const * const cimg_library::cimg::t_purple = cimg::t_normal

Definition at line 2265 of file cimg.h.

Referenced by info(), and option().

Definition at line 2265 of file cimg.h.

Referenced by info(), and option().

const double cimg_library::cimg::valuePI = 3.14159265358979323846
Generated by  doxygen 1.6.2-20100208