php imagecreate调用imagecolorallocate无法改变颜色
imagecreate和imagecreatetruecolor()。
推荐使用imagecreatetruecolor()。
php官网中提到
Note:
第一次对 imagecolorallocate() 的调用会给基于调色板的图像填充背景色,即用 imagecreate() 建立的图像。
所以创建image时用imagecreatetruecolor这个方法
具体原因未知
原创
2017-11-07 00:34:31 ·
1699 阅读 ·
0 评论