diff options
author | Pierre Joye <pajoye@php.net> | 2006-01-27 18:05:26 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2006-01-27 18:05:26 +0000 |
commit | 2901af230cd62174f94b8eb6b74cb20ff9e81c14 (patch) | |
tree | 624f7526662e4abfba1fc6fdd335617a36e6e877 | |
parent | 451e86f59afb6b18e458c83ca469bfd6fe388b61 (diff) | |
download | php-git-2901af230cd62174f94b8eb6b74cb20ff9e81c14.tar.gz |
- add PNG filter constants
-rw-r--r-- | ext/gd/gd.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 23ec39588e..47b79075bd 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -402,6 +402,22 @@ PHP_MINIT_FUNCTION(gd) #else REGISTER_LONG_CONSTANT("GD_BUNDLED", 0, CONST_CS | CONST_PERSISTENT); #endif + +#ifdef HAVE_GD_PNG + /* + * cannot include #include "png.h" + * /usr/include/pngconf.h:310:2: error: #error png.h already includes setjmp.h with some additional fixup. + * as error, use the values for now... + */ + REGISTER_LONG_CONSTANT("PNG_NO_FILTER", 0x00, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_NONE", 0x08, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_SUB", 0x10, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_UP", 0x20, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_AVG", 0x40, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_FILTER_PAETH", 0x80, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("PNG_ALL_FILTERS", 0x08 | 0x10 | 0x20 | 0x40 | 0x80, CONST_CS | CONST_PERSISTENT); +#endif + return SUCCESS; } /* }}} */ |