Home >Backend Development >PHP Tutorial >imagecolorallocate 分配失败,该如何处理

imagecolorallocate 分配失败,该如何处理

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 11:47:40932browse

imagecolorallocate 分配失败

<br />$imageHand = imagecreatefromgif("images/mb.gif");<br />$color = imagecolorallocate($imageHand,0,0,0);<br />var_dump($color);<br />


但我的这个imagecolorallocate总是分配失败,导致以后的字体全部是白色,看不清楚,请问大哥们这是什么清空啊  我擦 死都找不到原因啊
------解决方案--------------------
报什么错?

贴出你的图片
------解决方案--------------------

引用:
Quote: 引用:

使用imagecreatetruecolor来创建的图像可以,是不是你的图像是8bit的,这样是不行的。

求老大 怎么查看图片是不是8bit啊


你分配颜色不成功,应该就是这个问题。
Statement:
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