imagecreatefromgd2

(PHP 4 >= 4.1.0, PHP 5)

imagecreatefromgd2 -- 从 GD2 文件或 URL 新建一图像

说明

resource imagecreatefromgd2 ( string filename )

警告

本函数暂无文档,仅有参数列表。

注: 本函数需要 GD 2.0.1 或更高版本。

提示: 如果“fopen wrappers”已经被激活,则在本函数中可以把 URL 作为文件名来使用。请参阅 fopen() 函数来获取怎样指定文件名的详细信息以及支持 URL 封装协议的列表:附录 L

警告

Windows 版本的 PHP 在 4.3.0 版之前不支持本函数的远程文件访问,即使 allow_url_fopen 选项已被激活。


add a note add a note User Contributed Notes
garrett at garrettm dot com
26-Nov-2002 01:06
i was working on getting gd 2.0.7 and php 4.2.3 to compile, undefined functions error, had to modify about 4 lines, 3 in php's source, ext/gd/gd.c and ext/gd/gd_ctx.c find anyline in those two files that matches

io_ctx->free

and make it

io_ctx->gd_free

and it should compile.
fiji at free dot fr
14-Oct-2002 07:50
I had to made some modification to enable and compile gd2.0.1 with php4.2.3 here it is:
get and untar gd2.0.1 beta
if your server as mine doesn't have any X support or you don't want it, open Makefile to disable xpm support, find "gdxpm.o"  in lines and delete it (because even if you don't ask for it in libs cmd it will compile in and you'll get an error when loading requesting libXpm)
remove any libgd1.so.xx
"make install"
in php goto ext/gd dir
modify gd.c and add "#define HAVE_LIBGD20 1" at the beginning
compile (don't forget giving the --with-jpeg-dir and png too), install and it should works