diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2019-06-20 23:40:51 +0200 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2019-06-20 23:40:51 +0200 |
commit | 81fd113506e4c5833e64998651f232734ebb2cb7 (patch) | |
tree | d92370413e673848b7fc774ecd0454fdf0e71966 /ext/gd/php_gd.h | |
parent | 2b4fc9eb9c0e0b607dfb0bf779936507be1ad58b (diff) | |
download | php-git-81fd113506e4c5833e64998651f232734ebb2cb7.tar.gz |
Support TGA reading
We add PHP bindings for libgd's features to read TGA files, which are
available as of libgd 2.1.0.
As PHP's bundled libgd doesn't yet include the respective features of the
external libgd, we add these.
Since TGA has no easily recognizable file signature, we don't add TGA
support for imagecreatefromstring() or getimagesize() and friends.
Diffstat (limited to 'ext/gd/php_gd.h')
-rw-r--r-- | ext/gd/php_gd.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index 982decd064..e6db0c0ec0 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -47,6 +47,7 @@ #define PHP_GDIMG_TYPE_GD2PART 10 #define PHP_GDIMG_TYPE_WEBP 11 #define PHP_GDIMG_TYPE_BMP 12 +#define PHP_GDIMG_TYPE_TGA 13 #define PHP_IMG_GIF 1 #define PHP_IMG_JPG 2 @@ -56,6 +57,7 @@ #define PHP_IMG_XPM 16 #define PHP_IMG_WEBP 32 #define PHP_IMG_BMP 64 +#define PHP_IMG_TGA 128 #ifdef PHP_WIN32 # define PHP_GD_API __declspec(dllexport) @@ -163,6 +165,9 @@ PHP_FUNCTION(imagecreatefromgd2part); #if defined(HAVE_GD_BMP) PHP_FUNCTION(imagecreatefrombmp); #endif +#if defined(HAVE_GD_TGA) +PHP_FUNCTION(imagecreatefromtga); +#endif #if defined(HAVE_GD_XPM) PHP_FUNCTION(imagecreatefromxpm); #endif |