"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gd.c" between
libgd-2.3.1.tar.gz and libgd-2.3.2.tar.gz

About: LibGD is a library for the dynamic creation of images by programmers (PNG, JPEG, GIF, WebP, XPM, BMP support).

gd.c  (libgd-2.3.1):gd.c  (libgd-2.3.2)
skipping to change at line 500 skipping to change at line 500
/* This code is taken from http://www.acm.org/jgt/papers/SmithLyons96/hwb_rgb.ht ml, an article /* This code is taken from http://www.acm.org/jgt/papers/SmithLyons96/hwb_rgb.ht ml, an article
* on colour conversion to/from RBG and HWB colour systems. * on colour conversion to/from RBG and HWB colour systems.
* It has been modified to return the converted value as a * parameter. * It has been modified to return the converted value as a * parameter.
*/ */
#define RETURN_HWB(h, w, b) {HWB->H = h; HWB->W = w; HWB->B = b; return HWB;} #define RETURN_HWB(h, w, b) {HWB->H = h; HWB->W = w; HWB->B = b; return HWB;}
#define RETURN_RGB(r, g, b) {RGB->R = r; RGB->G = g; RGB->B = b; return RGB;} #define RETURN_RGB(r, g, b) {RGB->R = r; RGB->G = g; RGB->B = b; return RGB;}
#define HWB_UNDEFINED -1 #define HWB_UNDEFINED -1
#define SETUP_RGB(s, r, g, b) {s.R = r/255.0; s.G = g/255.0; s.B = b/255.0;} #define SETUP_RGB(s, r, g, b) {s.R = r/255.0; s.G = g/255.0; s.B = b/255.0;}
#define MIN(a,b) ((a)<(b)?(a):(b))
#define MIN3(a,b,c) ((a)<(b)?(MIN(a,c)):(MIN(b,c)))
#define MAX(a,b) ((a)<(b)?(b):(a))
#define MAX3(a,b,c) ((a)<(b)?(MAX(b,c)):(MAX(a,c)))
/* /*
* Theoretically, hue 0 (pure red) is identical to hue 6 in these transforms. Pu re * Theoretically, hue 0 (pure red) is identical to hue 6 in these transforms. Pu re
* red always maps to 6 in this implementation. Therefore UNDEFINED can be * red always maps to 6 in this implementation. Therefore UNDEFINED can be
* defined as 0 in situations where only unsigned numbers are desired. * defined as 0 in situations where only unsigned numbers are desired.
*/ */
typedef struct { typedef struct {
float R, G, B; float R, G, B;
} }
RGBType; RGBType;
typedef struct { typedef struct {
 End of changes. 1 change blocks. 
5 lines changed or deleted 0 lines changed or added

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