在PHP中使用imagerotate()的颜色格式是什么? [英] What is the color format to use with imagerotate() in PHP?
本文介绍了在PHP中使用imagerotate()的颜色格式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在PHP中;什么格式用于函数imagerotate()中的背景颜色选项。
In PHP; what format is used for the background color option in the function imagerotate().
$color = "???????";
imagerotate($image, $degrees, $color);
我试过:
$color = "#FFFFFF";
$color = "255255255";
推荐答案
我想你必须使用imagecolorallocate :
I think you have to specify it with imagecolorallocate():
// sets some colors
$white = imagecolorallocate($im, 255, 255, 255);
$black = imagecolorallocate($im, 0, 0, 0);
// hexadecimal way
$white = imagecolorallocate($im, 0xFF, 0xFF, 0xFF);
$black = imagecolorallocate($im, 0x00, 0x00, 0x00);
透过手册页
这篇关于在PHP中使用imagerotate()的颜色格式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文