Back to index

php5  5.3.10
php_gd.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Rasmus Lerdorf <rasmus@php.net>                             |
00016    |          Stig Bakken <ssb@php.net>                                   |
00017    +----------------------------------------------------------------------+
00018 */
00019 
00020 /* $Id: php_gd.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 #ifndef PHP_GD_H
00023 #define PHP_GD_H
00024 
00025 #define HAVE_GDIMAGECREATEFROMPNG 1
00026 
00027 #if HAVE_LIBFREETYPE
00028 # ifndef ENABLE_GD_TTF
00029 #  define ENABLE_GD_TTF
00030 # endif
00031 #endif
00032 
00033 #if HAVE_LIBGD
00034 
00035 /* open_basedir and safe_mode checks */
00036 #define PHP_GD_CHECK_OPEN_BASEDIR(filename, errormsg)                                   \
00037        if (!filename || php_check_open_basedir(filename TSRMLS_CC) ||                      \
00038               (PG(safe_mode) && !php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))   \
00039        ) {                                                                                 \
00040               php_error_docref(NULL TSRMLS_CC, E_WARNING, errormsg);                          \
00041               RETURN_FALSE;                                                                   \
00042        }
00043 
00044 #define PHP_GDIMG_TYPE_GIF      1
00045 #define PHP_GDIMG_TYPE_PNG      2
00046 #define PHP_GDIMG_TYPE_JPG      3
00047 #define PHP_GDIMG_TYPE_WBM      4
00048 #define PHP_GDIMG_TYPE_XBM      5
00049 #define PHP_GDIMG_TYPE_XPM      6
00050 #define PHP_GDIMG_CONVERT_WBM   7
00051 #define PHP_GDIMG_TYPE_GD       8
00052 #define PHP_GDIMG_TYPE_GD2      9
00053 #define PHP_GDIMG_TYPE_GD2PART 10
00054 
00055 #ifdef PHP_WIN32
00056 #      define PHP_GD_API __declspec(dllexport)
00057 #elif defined(__GNUC__) && __GNUC__ >= 4
00058 #      define PHP_GD_API __attribute__ ((visibility("default")))
00059 #else
00060 #      define PHP_GD_API
00061 #endif
00062 
00063 PHPAPI extern const char php_sig_gif[3];
00064 PHPAPI extern const char php_sig_jpg[3];
00065 PHPAPI extern const char php_sig_png[3];
00066 
00067 extern zend_module_entry gd_module_entry;
00068 #define phpext_gd_ptr &gd_module_entry
00069 
00070 /* gd.c functions */
00071 PHP_MINFO_FUNCTION(gd);
00072 PHP_MINIT_FUNCTION(gd);
00073 #if HAVE_LIBT1 || HAVE_GD_FONTMUTEX
00074 PHP_MSHUTDOWN_FUNCTION(gd);
00075 #endif
00076 #if HAVE_GD_STRINGFT
00077 PHP_RSHUTDOWN_FUNCTION(gd);
00078 #endif
00079 
00080 PHP_FUNCTION(gd_info);
00081 PHP_FUNCTION(imagearc);
00082 PHP_FUNCTION(imageellipse);
00083 PHP_FUNCTION(imagechar);
00084 PHP_FUNCTION(imagecharup);
00085 PHP_FUNCTION(imageistruecolor);
00086 PHP_FUNCTION(imagecolorallocate);
00087 PHP_FUNCTION(imagepalettecopy);
00088 PHP_FUNCTION(imagecolorat);
00089 PHP_FUNCTION(imagecolorclosest);
00090 PHP_FUNCTION(imagecolorclosesthwb);
00091 PHP_FUNCTION(imagecolordeallocate);
00092 PHP_FUNCTION(imagecolorresolve);
00093 PHP_FUNCTION(imagecolorexact);
00094 PHP_FUNCTION(imagecolorset);
00095 PHP_FUNCTION(imagecolorstotal);
00096 PHP_FUNCTION(imagecolorsforindex);
00097 PHP_FUNCTION(imagecolortransparent);
00098 PHP_FUNCTION(imagecopy);
00099 PHP_FUNCTION(imagecopymerge);
00100 PHP_FUNCTION(imagecopyresized);
00101 PHP_FUNCTION(imagetypes);
00102 PHP_FUNCTION(imagecreate);
00103 PHP_FUNCTION(imageftbbox);
00104 PHP_FUNCTION(imagefttext);
00105 
00106 PHP_FUNCTION(imagecreatetruecolor);
00107 PHP_FUNCTION(imagetruecolortopalette);
00108 PHP_FUNCTION(imagesetthickness);
00109 PHP_FUNCTION(imagefilledellipse);
00110 PHP_FUNCTION(imagefilledarc);
00111 PHP_FUNCTION(imagealphablending);
00112 PHP_FUNCTION(imagesavealpha);
00113 PHP_FUNCTION(imagecolorallocatealpha);
00114 PHP_FUNCTION(imagecolorresolvealpha);
00115 PHP_FUNCTION(imagecolorclosestalpha);
00116 PHP_FUNCTION(imagecolorexactalpha);
00117 PHP_FUNCTION(imagecopyresampled);
00118 
00119 #ifdef PHP_WIN32
00120 PHP_FUNCTION(imagegrabwindow);
00121 PHP_FUNCTION(imagegrabscreen);
00122 #endif
00123 
00124 PHP_FUNCTION(imagerotate);
00125 
00126 #ifdef HAVE_GD_BUNDLED
00127 PHP_FUNCTION(imageantialias);
00128 #endif
00129 
00130 PHP_FUNCTION(imagesetthickness);
00131 PHP_FUNCTION(imagecopymergegray);
00132 PHP_FUNCTION(imagesetbrush);
00133 PHP_FUNCTION(imagesettile);
00134 PHP_FUNCTION(imagesetstyle);
00135 
00136 PHP_FUNCTION(imagecreatefromstring);
00137 PHP_FUNCTION(imagecreatefromgif);
00138 PHP_FUNCTION(imagecreatefromjpeg);
00139 PHP_FUNCTION(imagecreatefromxbm);
00140 PHP_FUNCTION(imagecreatefrompng);
00141 PHP_FUNCTION(imagecreatefromwbmp);
00142 PHP_FUNCTION(imagecreatefromgd);
00143 PHP_FUNCTION(imagecreatefromgd2);
00144 PHP_FUNCTION(imagecreatefromgd2part);
00145 #if defined(HAVE_GD_XPM) && defined(HAVE_GD_BUNDLED)
00146 PHP_FUNCTION(imagecreatefromxpm);
00147 #endif
00148 
00149 PHP_FUNCTION(imagegammacorrect);
00150 PHP_FUNCTION(imagedestroy);
00151 PHP_FUNCTION(imagefill);
00152 PHP_FUNCTION(imagefilledpolygon);
00153 PHP_FUNCTION(imagefilledrectangle);
00154 PHP_FUNCTION(imagefilltoborder);
00155 PHP_FUNCTION(imagefontwidth);
00156 PHP_FUNCTION(imagefontheight);
00157 
00158 PHP_FUNCTION(imagegif );
00159 PHP_FUNCTION(imagejpeg );
00160 PHP_FUNCTION(imagepng);
00161 PHP_FUNCTION(imagewbmp);
00162 PHP_FUNCTION(imagegd);
00163 PHP_FUNCTION(imagegd2);
00164 
00165 PHP_FUNCTION(imageinterlace);
00166 PHP_FUNCTION(imageline);
00167 PHP_FUNCTION(imageloadfont);
00168 PHP_FUNCTION(imagepolygon);
00169 PHP_FUNCTION(imagerectangle);
00170 PHP_FUNCTION(imagesetpixel);
00171 PHP_FUNCTION(imagestring);
00172 PHP_FUNCTION(imagestringup);
00173 PHP_FUNCTION(imagesx);
00174 PHP_FUNCTION(imagesy);
00175 PHP_FUNCTION(imagedashedline);
00176 PHP_FUNCTION(imagettfbbox);
00177 PHP_FUNCTION(imagettftext);
00178 PHP_FUNCTION(imagepsloadfont);
00179 /*
00180 PHP_FUNCTION(imagepscopyfont);
00181 */
00182 PHP_FUNCTION(imagepsfreefont);
00183 PHP_FUNCTION(imagepsencodefont);
00184 PHP_FUNCTION(imagepsextendfont);
00185 PHP_FUNCTION(imagepsslantfont);
00186 PHP_FUNCTION(imagepstext);
00187 PHP_FUNCTION(imagepsbbox);
00188 
00189 PHP_FUNCTION(jpeg2wbmp);
00190 PHP_FUNCTION(png2wbmp);
00191 PHP_FUNCTION(image2wbmp);
00192 
00193 PHP_FUNCTION(imagecolormatch);
00194 
00195 #if HAVE_GD_BUNDLED
00196 PHP_FUNCTION(imagelayereffect);
00197 PHP_FUNCTION(imagexbm);
00198 #endif
00199 
00200 PHP_FUNCTION(imagefilter);
00201 PHP_FUNCTION(imageconvolution);
00202 
00203 PHP_GD_API int phpi_get_le_gd(void);
00204 
00205 #else
00206 
00207 #define phpext_gd_ptr NULL
00208 
00209 #endif
00210 
00211 #endif /* PHP_GD_H */