"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gmic.h" between
gmic_2.8.1.tar.gz and gmic_2.8.2.tar.gz

About: G’MIC (GREY’s Magic for Image Computing) is a framework for image processing. It provides several different user interfaces to convert/manipulate/filter/ visualize generic image datasets (usable standalone or as plug-in for GIMP and Krita).

gmic.h  (gmic_2.8.1):gmic.h  (gmic_2.8.2)
skipping to change at line 55 skipping to change at line 55
# requirements in conditions enabling the security of their systems and/or # requirements in conditions enabling the security of their systems and/or
# data to be ensured and, more generally, to use and operate it in the # data to be ensured and, more generally, to use and operate it in the
# same conditions as regards security. # same conditions as regards security.
# #
# The fact that you are presently reading this means that you have had # The fact that you are presently reading this means that you have had
# knowledge of the CeCILL and CeCILL-C licenses and that you accept its terms. # knowledge of the CeCILL and CeCILL-C licenses and that you accept its terms.
# #
*/ */
#ifndef gmic_version #ifndef gmic_version
#define gmic_version 281 #define gmic_version 282
#ifndef gmic_pixel_type #ifndef gmic_pixel_type
#define gmic_pixel_type float #define gmic_pixel_type float
#endif #endif
#include <cstdio> #include <cstdio>
#include <cstring> #include <cstring>
#ifndef gmic_build #ifndef gmic_build
skipping to change at line 81 skipping to change at line 81
#define gmic_list CImgList #define gmic_list CImgList
namespace cimg_library { namespace cimg_library {
// Class 'gmic_image<T>'. // Class 'gmic_image<T>'.
template<typename T> struct gmic_image { template<typename T> struct gmic_image {
unsigned int _width; // Number of image columns (dimension along the X -axis) unsigned int _width; // Number of image columns (dimension along the X -axis)
unsigned int _height; // Number of image lines (dimension along the Y-a xis) unsigned int _height; // Number of image lines (dimension along the Y-a xis)
unsigned int _depth; // Number of image slices (dimension along the Z- axis) unsigned int _depth; // Number of image slices (dimension along the Z- axis)
unsigned int _spectrum; // Number of image channels (dimension along the C-axis) unsigned int _spectrum; // Number of image channels (dimension along the C-axis)
bool _is_shared; // Tells if the data buffer is shared by another structure bool _is_shared; // Tells if the data buffer has been allocated by another object
T *_data; // Pointer to the first pixel value T *_data; // Pointer to the first pixel value
// Destructor. // Destructor.
~gmic_image(); ~gmic_image();
// Constructor. // Constructor.
gmic_image():_width(0),_height(0),_depth(0),_spectrum(0),_is_shared(false),_ data(0) {} gmic_image():_width(0),_height(0),_depth(0),_spectrum(0),_is_shared(false),_ data(0) {}
// Allocate memory for specified image dimensions. // Allocate memory for specified image dimensions.
gmic_image<T>& assign(const unsigned int size_x, const unsigned int size_y=1 , gmic_image<T>& assign(const unsigned int size_x, const unsigned int size_y=1 ,
const unsigned int size_z=1, const unsigned int size_c =1); const unsigned int size_z=1, const unsigned int size_c =1);
// Create image by copying existing buffer of t values.
template<typename t>
gmic_image<T>& assign(const t *const values, const unsigned int size_x, cons
t unsigned int size_y=1,
const unsigned int size_z=1, const unsigned int size_c
=1);
gmic_image<T>& assign(const T *const values, const unsigned int size_x, cons
t unsigned int size_y,
const unsigned int size_z, const unsigned int size_c,
const bool is_shared);
// Pixel access. // Pixel access.
operator T*() { operator T*() {
return _data; return _data;
} }
operator const T*() const { operator const T*() const {
return _data; return _data;
} }
T& operator()(const unsigned int x, const unsigned int y=0, const unsigned z =0, const unsigned c=0) { T& operator()(const unsigned int x, const unsigned int y=0, const unsigned z =0, const unsigned c=0) {
skipping to change at line 263 skipping to change at line 271
// Functions below should be considered as *private*, and should not be used i n user's code. // Functions below should be considered as *private*, and should not be used i n user's code.
template<typename T> template<typename T>
static bool search_sorted(const char *const str, const T& list, const unsigned int length, unsigned int &out_ind); static bool search_sorted(const char *const str, const T& list, const unsigned int length, unsigned int &out_ind);
template<typename T> template<typename T>
static double mp_call(char *const str, void *const p_list, const T& pixel_type ); static double mp_call(char *const str, void *const p_list, const T& pixel_type );
template<typename Ts, typename T> template<typename Ts, typename T>
static double mp_store(const Ts *const ptr, static double mp_store(const Ts *const ptr,
const unsigned int w, const unsigned int h, const unsig ned int d, const unsigned int s, const unsigned int w, const unsigned int h, const unsig ned int d, const unsigned int s,
const char *const str, void *const p_list, const T& pix el_type); const char *const str, void *const p_list, const T& pix el_type);
static bool get_debug_info(const char *const s, unsigned int &line_number, uns igned int &file_number);
static int _levenshtein(const char *const s, const char *const t, static int _levenshtein(const char *const s, const char *const t,
gmic_image<int>& d, const int i, const int j); gmic_image<int>& d, const int i, const int j);
static int levenshtein(const char *const s, const char *const t); static int levenshtein(const char *const s, const char *const t);
static bool check_filename(const char *const filename); static bool check_filename(const char *const filename);
static unsigned int hashcode(const char *const str, const bool is_variable); static unsigned int hashcode(const char *const str, const bool is_variable);
static bool command_has_arguments(const char *const command); static bool command_has_arguments(const char *const command);
static const char* basename(const char *const str); static const char* basename(const char *const str);
static char *strreplace_fw(char *const str); static char *strreplace_fw(char *const str);
static char *strreplace_bw(char *const str); static char *strreplace_bw(char *const str);
static unsigned int strescape(const char *const str, char *const res); static unsigned int strescape(const char *const str, char *const res);
 End of changes. 4 change blocks. 
2 lines changed or deleted 15 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)