
This is basically a port of the "Small code cleanup" commit[1]. We can now drop the superfluous checks for zero width/height. These have been introduced as fix for bug 72337[2], while the same issue had a simpler fix for upstream[3], because the helper functions already were internal. [1] <e054be7d82
> [2] <https://bugs.php.net/72337> [3] <77309c419c
>
21 lines
597 B
C
21 lines
597 B
C
#ifndef GD_INTERN_H
|
|
#define GD_INTERN_H
|
|
#ifndef MIN
|
|
#define MIN(a,b) ((a)<(b)?(a):(b))
|
|
#endif
|
|
#define MIN3(a,b,c) ((a)<(b)?(MIN(a,c)):(MIN(b,c)))
|
|
#ifndef MAX
|
|
#define MAX(a,b) ((a)<(b)?(b):(a))
|
|
#endif
|
|
#define MAX3(a,b,c) ((a)<(b)?(MAX(b,c)):(MAX(a,c)))
|
|
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x)))
|
|
|
|
/* Internal prototypes: */
|
|
|
|
/* gd_rotate.c */
|
|
gdImagePtr gdImageRotate90(gdImagePtr src, int ignoretransparent);
|
|
gdImagePtr gdImageRotate180(gdImagePtr src, int ignoretransparent);
|
|
gdImagePtr gdImageRotate270(gdImagePtr src, int ignoretransparent);
|
|
|
|
#endif
|