php 来自https://stackoverflow.com/questions/1394061/how-to-merge-transparent-png-with-image-using-php

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php 来自https://stackoverflow.com/questions/1394061/how-to-merge-transparent-png-with-image-using-php相关的知识,希望对你有一定的参考价值。

<?php
 # If you don't know the type of image you are using as your originals.
 $image = imagecreatefromstring(file_get_contents($your_original_image));
 $frame = imagecreatefromstring(file_get_contents($your_frame_image));

 # If you know your originals are of type PNG.
 $image = imagecreatefrompng($your_original_image);
 $frame = imagecreatefrompng($your_frame_image);

 imagecopymerge($image, $frame, 0, 0, 0, 0, 50, 50, 100);

 # Save the image to a file
 imagepng($image, '/path/to/save/image.png');

 # Output straight to the browser.
 imagepng($image);
?>

以上是关于php 来自https://stackoverflow.com/questions/1394061/how-to-merge-transparent-png-with-image-using-php的主要内容,如果未能解决你的问题,请参考以下文章

mariadb mysql -u root -p 显示Access denied解决办法

PHP:使用来自 php 的参数调用 javascript 函数

来自php的JSON数组[关闭]

PHP 来自php脚本的Linux shell命令

PHP 来自PHP的HTTP POST,没有cURL

如何使用 PHP 显示来自 Amazon S3 的图像?