In PHP; what format is used for the background color option in the function imagerotate().
$color = "???????";
imagerotate($image, $degrees, $color);
I have tried:
$color = "#FFFFFF";
$color = "255255255";
In PHP; what format is used for the background color option in the function imagerotate().
$color = "???????";
imagerotate($image, $degrees, $color);
I have tried:
$color = "#FFFFFF";
$color = "255255255";
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);
via the man pages
You need to previouslly allocate the desired $color
with imagecolorallocate()
or imagecolorallocatealpha()
.