【发布时间】:2016-09-01 02:21:55
【问题描述】:
在css中,我们有一个叫“z-index”的属性,PHP GD和Image Functions中控制“z-index”有什么相同之处?
我一直在寻找,但我找不到,请帮助。 谢谢你
【问题讨论】:
在css中,我们有一个叫“z-index”的属性,PHP GD和Image Functions中控制“z-index”有什么相同之处?
我一直在寻找,但我找不到,请帮助。 谢谢你
【问题讨论】:
php GD 库中没有像 z-index 这样的东西 但是有几种方法可以将图像重叠在图像上或将文本重叠在图像上
$redimg = imagecreatetruecolor(100, 100);
$image = imagecreatefrompng('image.png');
// sets background to red
$red = imagecolorallocate($redimg, 255, 0, 0);
imagefill($redimg, 0, 0, $red);
// Merge the red image onto the PNG image
imagecopymerge($image, $redimg, 0, 0, 0, 0, 100, 100, 75);
header('Content-type: image/png');
imagepng($image);
imagedestroy($image);
imagedestroy($redimg);
这里有一个例子,或者让我知道,你到底想做什么,我会帮助你 还有更多信息here。
【讨论】: