Reference
Contains low-level functions and variables of the CImg Library. More...
Functions | |
| std::FILE * | output (std::FILE *file) |
| Get/set default output stream for the CImg library messages. | |
| void | info () |
| Print information about CImg environment 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. | |
| unsigned int | openmp_mode (const unsigned int mode) |
| Set current CImg openmp mode. | |
| unsigned int | openmp_mode () |
| Return current CImg openmp 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, const bool is_verbose=false) |
| 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 long | time () |
| Return the value of a system timer, with a millisecond precision. | |
| unsigned long long | tic () |
| Start tic/toc timer for time measurement between code instructions. | |
| unsigned long 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(). | |
| 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. | |
| double | acosh (const double x) |
| Return hyperbolic arcosine of a value. | |
| double | asinh (const double x) |
| Return hyperbolic arcsine of a value. | |
| double | atanh (const double x) |
| Return hyperbolic arctangent of a value. | |
| double | sinc (const double x) |
| Return the sinc of a given value. | |
| double | log2 (const double x) |
| Return base-2 logarithm of a value. | |
| template<typename T> | |
| T | sqr (const T &val) |
| Return square of a value. | |
| template<typename T> | |
| double | cbrt (const T &x) |
| Return cubic root of a value. | |
| template<typename t> | |
| t | min (const t &a, const t &b, const t &c) |
| Return the minimum between three values. | |
| template<typename t> | |
| t | min (const t &a, const t &b, const t &c, const t &d) |
| Return the minimum between four values. | |
| template<typename t> | |
| t | minabs (const t &a, const t &b) |
| Return the minabs between two values. | |
| template<typename t> | |
| t | max (const t &a, const t &b, const t &c) |
| Return the maximum between three values. | |
| template<typename t> | |
| t | max (const t &a, const t &b, const t &c, const t &d) |
| Return the maximum between four values. | |
| template<typename t> | |
| t | maxabs (const t &a, const t &b) |
| Return the maxabs between two values. | |
| template<typename T> | |
| T | sign (const T &x) |
| Return the sign of a value. | |
| template<typename T> | |
| T | cut (const T &val, const T &val_min, const T &val_max) |
| Cut (i.e. clamp) value in specified interval. | |
| template<typename T> | |
| T | abscut (const T &val, const T &val_min, const T &val_max, const T &offset) |
| Cut (i.e. clamp) absolute value in specified interval. | |
| template<typename T> | |
| unsigned long long | nearest_pow2 (const T &x) |
| Return the nearest power of 2 higher than 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. | |
| template<typename T> | |
| T | round (const T &x, const double y, const int rounding_type=0) |
| Return rounded value. | |
| template<typename T> | |
| T | hypot (const T x, const T y) |
| Return sqrt(x^2 + y^2). | |
| template<typename T> | |
| T | hypot (const T x, const T y, const T z) |
| Return sqrt(x^2 + y^2 + z^2). | |
| double | factorial (const int n) |
| Return the factorial of n. | |
| double | permutations (const int k, const int n, const bool with_order) |
| Return the number of permutations of k objects in a set of n objects. | |
| double | fibonacci (const int n) |
| Calculate fibonacci number. | |
| template<typename T> | |
| T | gcd (T a, T b) |
| Calculate greatest common divisor of two integers. | |
| template<typename T> | |
| T | lcm (T a, T b) |
| Calculate least common multiple of two integers. | |
| char | lowercase (const char x) |
| Convert character to lower case. | |
| void | lowercase (char *const str) |
| Convert C-string to lower case. | |
| char | uppercase (const char x) |
| Convert character to upper case. | |
| void | uppercase (char *const str) |
| Convert C-string to upper case. | |
| bool | is_blank (const char c) |
Return true if input character is blank (space, tab, or non-printable character). | |
| bool | is_varname (const char *const str, const unsigned int length=~0U) |
Return true if argument str can be considered as a regular variable name. | |
| double | atof (const char *const str) |
| Read value in a C-string. | |
| int | strncasecmp (const char *const str1, const char *const str2, const int length) |
Compare the first length 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. | |
| char * | strellipsize (char *const str, const unsigned int l=64, const bool is_ending=true) |
| Ellipsize a string. | |
| char * | strellipsize (const char *const str, char *const res, const unsigned int l=64, const bool is_ending=true) |
| Ellipsize a string. | |
| bool | strpare (char *const str, const char delimiter, const bool is_symmetric, const bool is_iterative) |
| Remove delimiters on the start and/or end of a C-string. | |
| bool | strpare (char *const str, const bool is_symmetric, const bool is_iterative) |
| Remove white spaces on the start and/or end of a C-string. | |
| void | strwindows_reserved (char *const str, const char c='_') |
| Replace reserved characters (for Windows filename) by another character. | |
| void | strunescape (char *const str) |
| Replace escape sequences in C-strings by character values. | |
| const char * | basename (const char *const s, const char separator='/') |
| 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. | |
| int | fseek (FILE *stream, long offset, int origin) |
| Version of 'fseek()' that supports >=64bits offsets everywhere (for Windows). | |
| long | ftell (FILE *stream) |
| Version of 'ftell()' that supports >=64bits offsets everywhere (for Windows). | |
| bool | is_directory (const char *const path) |
| Check if a path is a directory. | |
| bool | is_file (const char *const path) |
| Check if a path is a file. | |
| long long | fsize (std::FILE *const file) |
| Get file size. | |
| template<typename T> | |
| int | fdate (const char *const path, T *attr, const unsigned int nb_attr) |
| Get last write time of a given file or directory (multiple-attributes version). | |
| int | fdate (const char *const path, unsigned int attr) |
| Get last write time of a given file or directory (single-attribute version). | |
| template<typename T> | |
| int | date (T *attr, const unsigned int nb_attr) |
| Get current local time (multiple-attributes version). | |
| int | date (unsigned int attr) |
| Get current local time (single-attribute version). | |
| const char * | curl_path (const char *const user_path, const bool reinit_path) |
| Search path of an executable. | |
| const char * | dcraw_path (const char *const user_path, const bool reinit_path) |
Get/set path to the dcraw binary. | |
| const char * | ffmpeg_path (const char *const user_path, const bool reinit_path) |
Get/set path to the FFMPEG's ffmpeg binary. | |
| const char * | graphicsmagick_path (const char *const user_path, const bool reinit_path) |
Get/set path to the GraphicsMagick's gm binary. | |
| const char * | gunzip_path (const char *const user_path, const bool reinit_path) |
Get/set path to the gunzip binary. | |
| const char * | gzip_path (const char *const user_path, const bool reinit_path) |
Get/set path to the gzip binary. | |
| const char * | imagemagick_path (const char *const user_path, const bool reinit_path) |
Get/set path to the ImageMagick's convert binary. | |
| const char * | medcon_path (const char *const user_path, const bool reinit_path) |
Get/set path to the Medcon's medcon binary. | |
| const char * | temporary_path (const char *const user_path, const bool reinit_path) |
| Get/set path to store temporary files. | |
| const char * | wget_path (const char *const user_path, const bool reinit_path) |
Get/set path to the wget 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 digits, char *const str) |
| Generate a numbered version of a filename. | |
| template<typename T> | |
| size_t | fread (T *const ptr, const size_t nmemb, std::FILE *stream) |
| Read data from file. | |
| template<typename T> | |
| size_t | fwrite (const T *ptr, const size_t nmemb, std::FILE *stream) |
| Write data to file. | |
| void | fempty (std::FILE *const file, const char *const filename) |
| Create an empty file. | |
| const char * | ftype (std::FILE *const file, const char *const filename) |
| Try to guess format from an image file. | |
| char * | load_network (const char *const url, char *const filename_local, const unsigned int timeout, const bool try_fallback, const char *const referer, const char *const user_agent) |
| 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 _default, const char *const usage, const bool reset_static) |
| Return options specified on the command line. | |
| CImgList< char > | files (const char *const path, const bool is_pattern=false, const unsigned int mode=2, const bool include_path=false) |
| Return list of files/directories in specified directory. | |
| 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. | |
Contains low-level functions and variables of the CImg Library.
Most of the functions and variables within this namespace are used by the CImg library for low-level operations. You may use them to access specific const values or environment variables internally used by CImg.
| std::FILE * output | ( | std::FILE * | file | ) |
Get/set default output stream for the CImg library messages.
| file | Desired output stream. Set to 0 to get the currently used output stream only. |
| void info | ( | ) |
Print information about CImg environment variables.
| unsigned int & exception_mode | ( | const unsigned int | mode | ) |
Set current CImg exception mode.
The way error messages are handled by CImg can be changed dynamically, using this function.
| mode | Desired exception mode. Possible values are:
|
| unsigned int & exception_mode | ( | ) |
Return current CImg exception mode.
cimg_verbosity | unsigned int openmp_mode | ( | const unsigned int | mode | ) |
Set current CImg openmp mode.
The way openmp-based methods are handled by CImg can be changed dynamically, using this function.
| mode | Desired openmp mode. Possible values are:
|
| double eval | ( | const char *const | expression, |
| const double | x, | ||
| const double | y, | ||
| const double | z, | ||
| const double | c ) |
Evaluate math expression.
| expression | C-string describing the formula to evaluate. |
| x | Value of the pre-defined variable x. |
| y | Value of the pre-defined variable y. |
| z | Value of the pre-defined variable z. |
| c | Value of the pre-defined variable c. |
expression to 0 to keep evaluating the last specified expression. | void warn | ( | const char *const | format, |
| ... ) |
Display a warning message on the default output stream.
| format | C-string containing the format of the message, as with std::printf(). |
cimg_strict_warnings is set, this function throws a CImgWarningException instead. warning_message can be arbitrary, to prevent nasty memory access. | int system | ( | const char *const | command, |
| const char *const | module_name = 0, | ||
| const bool | is_verbose = false ) |
| command | C-string containing the command line to execute. |
| module_name | Module name. |
| bool endianness | ( | ) |
Return the endianness of the current architecture.
false for Little Endian or true for Big Endian. | void invert_endianness | ( | T *const | buffer, |
| const unsigned long | size ) |
Reverse endianness of all elements in a memory buffer.
| [in,out] | buffer | Memory buffer whose endianness must be reversed. |
| size | Number of buffer elements to reverse. |
| T & invert_endianness | ( | T & | a | ) |
Reverse endianness of a single variable.
| [in,out] | a | Variable to reverse. |
| unsigned long long time | ( | ) |
Return the value of a system timer, with a millisecond precision.
0. | unsigned long long tic | ( | ) |
Start tic/toc timer for time measurement between code instructions.
| unsigned long long toc | ( | ) |
| void sleep | ( | const unsigned int | milliseconds | ) |
Sleep for a given numbers of milliseconds.
| milliseconds | Number of milliseconds to wait for. |
| unsigned int wait | ( | const unsigned int | milliseconds | ) |
Wait for a given number of milliseconds since the last call to wait().
| milliseconds | Number of milliseconds to wait for. |
| T mod | ( | const T & | x, |
| const T & | m ) |
Return the modulo of a value.
| x | Input value. |
| m | Modulo value. |
| T minmod | ( | const T & | a, |
| const T & | b ) |
Return the min-mod of two values.
a,b) is defined to be:a,b) = min(a,b), if a and b have the same sign.a,b) = 0, if a and b have different signs. | T round | ( | const T & | x, |
| const double | y, | ||
| const int | rounding_type = 0 ) |
Return rounded value.
| x | Value to be rounded. |
| y | Rounding precision. |
| rounding_type | Type of rounding operation (0 = nearest, -1 = backward, 1 = forward). |
x. | double atof | ( | const char *const | str | ) |
Read value in a C-string.
| str | C-string containing the float value to read. |
| int strncasecmp | ( | const char *const | str1, |
| const char *const | str2, | ||
| const int | length ) |
Compare the first length characters of two C-strings, ignoring the case.
| str1 | C-string. |
| str2 | C-string. |
| length | Number of characters to compare. |
0 if the two strings are equal, something else otherwise. | int strcasecmp | ( | const char *const | str1, |
| const char *const | str2 ) |
Compare two C-strings, ignoring the case.
| str1 | C-string. |
| str2 | C-string. |
0 if the two strings are equal, something else otherwise. | char * strellipsize | ( | char *const | str, |
| const unsigned int | l = 64, | ||
| const bool | is_ending = true ) |
Ellipsize a string.
| str | C-string. |
| l | Max number of printed characters. |
| is_ending | Tell if the dots are placed at the end or at the center of the ellipsized string. |
| char * strellipsize | ( | const char *const | str, |
| char *const | res, | ||
| const unsigned int | l = 64, | ||
| const bool | is_ending = true ) |
Ellipsize a string.
| str | C-string. |
| res | output C-string. |
| l | Max number of printed characters. String 'res' must be a size of at least 'l+1'. |
| is_ending | Tell if the dots are placed at the end or at the center of the ellipsized string. |
| bool strpare | ( | char *const | str, |
| const char | delimiter, | ||
| const bool | is_symmetric, | ||
| const bool | is_iterative ) |
Remove delimiters on the start and/or end of a C-string.
| [in,out] | str | C-string to work with (modified at output). |
| delimiter | Delimiter character code to remove. | |
| is_symmetric | Tells if the removal is done only if delimiters are symmetric (both at the beginning and the end of s). | |
| is_iterative | Tells if the removal is done if several iterations are possible. |
true if delimiters have been removed, false otherwise. | void strwindows_reserved | ( | char *const | str, |
| const char | c = '_' ) |
Replace reserved characters (for Windows filename) by another character.
| [in,out] | str | C-string to work with (modified at output). |
| [in] | c | Replacement character. |
| void strunescape | ( | char *const | str | ) |
Replace escape sequences in C-strings by character values.
| [in,out] | str | C-string to work with (modified at output). |
| std::FILE * fopen | ( | const char *const | path, |
| const char *const | mode ) |
Open a file.
| path | Path of the filename to open. |
| mode | C-string describing the opening mode. |
CImgIOException when the specified file cannot be opened, instead of returning 0. | int fclose | ( | std::FILE * | file | ) |
Close a file.
| file | File to close. |
0 if file has been closed properly, something else otherwise. | bool is_directory | ( | const char *const | path | ) |
Check if a path is a directory.
| path | Specified path to test. |
| bool is_file | ( | const char *const | path | ) |
Check if a path is a file.
| path | Specified path to test. |
| long long fsize | ( | std::FILE *const | file | ) |
Get file size.
| filename | Specified filename to get size from. |
| int fdate | ( | const char *const | path, |
| T * | attr, | ||
| const unsigned int | nb_attr ) |
Get last write time of a given file or directory (multiple-attributes version).
| path | Specified path to get attributes from. | |
| [in,out] | attr | Type of requested time attributes. Can be { 0=year | 1=month | 2=day | 3=day of week | 4=hour | 5=minute | 6=second } Replaced by read attributes after return (or -1 if an error occurred). |
| nb_attr | Number of attributes to read/write. |
| int fdate | ( | const char *const | path, |
| unsigned int | attr ) |
Get last write time of a given file or directory (single-attribute version).
| path | Specified path to get attributes from. |
| attr | Type of requested time attributes. Can be { 0=year | 1=month | 2=day | 3=day of week | 4=hour | 5=minute | 6=second } |
| int date | ( | T * | attr, |
| const unsigned int | nb_attr ) |
Get current local time (multiple-attributes version).
| [in,out] | attr | Type of requested time attributes. Can be { 0=year | 1=month | 2=day | 3=day of week | 4=hour | 5=minute | 6=second | 7=millisecond } Replaced by read attributes after return (or -1 if an error occurred). |
| nb_attr | Number of attributes to read/write. |
| int date | ( | unsigned int | attr | ) |
Get current local time (single-attribute version).
| attr | Type of requested time attribute. Can be { 0=year | 1=month | 2=day | 3=day of week | 4=hour | 5=minute | 6=second | 7=millisecond } |
| const char * curl_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Search path of an executable.
Get the file or directory attributes with support for UTF-8 paths (Windows only). Get/set path to the Program Files/ directory (Windows only).
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
curl binary. | user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
curl binary. | const char * dcraw_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to the dcraw binary.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
dcraw binary. | const char * ffmpeg_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to the FFMPEG's ffmpeg binary.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
ffmpeg binary. | const char * graphicsmagick_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to the GraphicsMagick's gm binary.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
gm binary. | const char * gunzip_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to the gunzip binary.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
gunzip binary. | const char * gzip_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to the gzip binary.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
gzip binary. | const char * imagemagick_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to the ImageMagick's convert binary.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
convert binary. | const char * medcon_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to the Medcon's medcon binary.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
medcon binary. | const char * temporary_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to store temporary files.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
| const char * wget_path | ( | const char *const | user_path, |
| const bool | reinit_path ) |
Get/set path to the wget binary.
| user_path | Specified path, or 0 to get the path currently used. |
| reinit_path | Force path to be recalculated (may take some time). |
wget binary. | const char * split_filename | ( | const char *const | filename, |
| char *const | body = 0 ) |
Split filename into two C-strings body and extension.
filename and body must not overlap!
| size_t fread | ( | T *const | ptr, |
| const size_t | nmemb, | ||
| std::FILE * | stream ) |
Read data from file.
| [out] | ptr | Pointer to memory buffer that will contain the binary data read from file. |
| nmemb | Number of elements to read. | |
| stream | File to read data from. |
| size_t fwrite | ( | const T * | ptr, |
| const size_t | nmemb, | ||
| std::FILE * | stream ) |
Write data to file.
| ptr | Pointer to memory buffer containing the binary data to write on file. | |
| nmemb | Number of elements to write. | |
| [out] | stream | File to write data on. |
| void fempty | ( | std::FILE *const | file, |
| const char *const | filename ) |
Create an empty file.
| file | Input file (can be 0 if filename is set). |
| filename | Filename, as a C-string (can be 0 if file is set). |
| const char * ftype | ( | std::FILE *const | file, |
| const char *const | filename ) |
Try to guess format from an image file.
| file | Input file (can be 0 if filename is set). |
| filename | Filename, as a C-string (can be 0 if file is set). |
0 if nothing has been guessed. | char * load_network | ( | const char *const | url, |
| char *const | filename_local, | ||
| const unsigned int | timeout, | ||
| const bool | try_fallback, | ||
| const char *const | referer, | ||
| const char *const | user_agent ) |
Load file from network as a local temporary file.
| url | URL of the filename, as a C-string. | |
| [out] | filename_local | C-string containing the path to a local copy of filename. |
| timeout | Maximum time (in seconds) authorized for downloading the file from the URL. | |
| try_fallback | When using libcurl, tells using system calls as fallbacks in case of libcurl failure. | |
| referer | Referer used, as a C-string. | |
| user_agent | User agent used, as a C-string. |
filename_local. libcurl library, or the external binaries wget or curl to perform the download. | CImgList< char > files | ( | const char *const | path, |
| const bool | is_pattern = false, | ||
| const unsigned int | mode = 2, | ||
| const bool | include_path = false ) |
Return list of files/directories in specified directory.
| path | Path to the directory. Set to 0 for current directory. |
| is_pattern | Tell if specified path has a matching pattern in it. |
| mode | Output type, can be primary { 0=files only | 1=folders only | 2=files + folders }. |
| include_path | Tell if path must be included in resulting filenames. |
| 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.
| title | Title of the dialog window. |
| msg | Main message displayed inside the dialog window. |
| button1_label | Label of the 1st button. |
| button2_label | Label of the 2nd button (0 to hide button). |
| button3_label | Label of the 3rd button (0 to hide button). |
| button4_label | Label of the 4th button (0 to hide button). |
| button5_label | Label of the 5th button (0 to hide button). |
| button6_label | Label of the 6th button (0 to hide button). |
| logo | Image logo displayed at the left of the main message. |
| is_centered | Tells if the dialog window must be centered on the screen. |
0 to 5), or -1 if the dialog window has been closed by the user.
Copyrights (C) From october 2004, David Tschumperlé - GREYC UMR CNRS 6072, Image team.
Copyrights (C) January->September 2004, David Tschumperlé.
Copyrights (C) 2000->2003, David Tschumperlé - INRIA Sophia-Antipolis. Odyssée group.