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

imagecolorallocate 分配失败,该如何处理

WBOY
Release: 2016-06-13 11:47:40
Original
927 people have browsed it

imagecolorallocate 分配失败

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


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

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

引用:
Quote: 引用:

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

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


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