开发者

Converting hex background color into a GIF in PHP

开发者 https://www.devze.com 2023-04-06 03:35 出处:网络
Is there any 开发者_开发技巧way to convert a hex color (#fffff) into a small .GIF image on the fly with PHP?....

Is there any 开发者_开发技巧way to convert a hex color (#fffff) into a small .GIF image on the fly with PHP?


....

<?php
// create the image
$im = imagecreatetruecolor(100, 100);

// fill the image with the color you want
imagefilledrectangle($im, 0, 0, 99, 99, 0xFFFFFF);

// set the headers and output the image
header('Content-Type: image/gif');
imagegif($im);
imagedestroy($im);
?>

http://www.php.net/manual/en/function.imagegif.php

0

精彩评论

暂无评论...
验证码 换一张
取 消