Home > Backend Development > PHP Tutorial > imagecreatefromstring()函数的用法解决办法

imagecreatefromstring()函数的用法解决办法

WBOY
Release: 2016-06-13 13:48:36
Original
5831 people have browsed it

imagecreatefromstring()函数的用法
手册上的说明:imagecreatefromstring ― 从字符串中的图像流新建一图像

我这样写的:

PHP code
<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->
    imagecreatefromstring("http://i3.sinaimg.cn/home/deco/2009/0330/logo_home.gif");

Copy after login


报错:
imagecreatefromstring() [function.imagecreatefromstring]: Data is not in a recognized format

这个函数的参数应该怎么写呢?

谢谢!

------解决方案--------------------
它的参数为图像字符串。

参见手册: http://php.net/manual/en/function.imagecreatefromstring.php
------解决方案--------------------
imagecreate ― 新建一个基于调色板的图像

imagecreatetruecolor ― 新建一个真彩色图像

imagecreatefromstring ― 创建一个图像资源从字符串中的图像流。

你看看你是属于哪种情况。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template