【问题标题】:"z-index" in php GDphp GD中的“z-index”
【发布时间】:2016-09-01 02:21:55
【问题描述】:

在css中,我们有一个叫“z-index”的属性,PHP GD和Image Functions中控制“z-index”有什么相同之处?

我一直在寻找,但我找不到,请帮助。 谢谢你

【问题讨论】:

    标签: php z-index gd


    【解决方案1】:

    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

    【讨论】:

      猜你喜欢
      • 2015-04-03
      • 1970-01-01
      • 1970-01-01
      • 2011-02-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-27
      • 2012-01-11
      相关资源
      最近更新 更多