当前位置: 代码迷 >> PHP >> imagecolorallocate 分配失败解决办法
  详细解决方案

imagecolorallocate 分配失败解决办法

热度:243   发布时间:2016-04-28 20:30:50.0
imagecolorallocate 分配失败

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


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

------解决方案--------------------
报什么错?

贴出你的图片
------解决方案--------------------
引用:
Quote: 引用:

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

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


你分配颜色不成功,应该就是这个问题。
  相关解决方案