Php 覆盖图像周围的黑框(GD库)

Php 覆盖图像周围的黑框(GD库),php,html,gd,Php,Html,Gd,好的,我已经成功地覆盖了两幅保持透明度的图像,但是现在在覆盖图像的右侧有一个巨大的黑匣子。。它还是透明的,我只需要把这个盒子拿走 这是我的密码 <?php header('Content-Type: image/png'); $master = imagecreatefrompng('Master.png'); $month = imagecreatefrompng('Mar.png'); imagealphablending($month,true); imagealphablen

好的,我已经成功地覆盖了两幅保持透明度的图像,但是现在在覆盖图像的右侧有一个巨大的黑匣子。。它还是透明的,我只需要把这个盒子拿走

这是我的密码

<?php
header('Content-Type: image/png');

$master = imagecreatefrompng('Master.png');
$month = imagecreatefrompng('Mar.png');

imagealphablending($month,true);

imagealphablending($master,true);

imagecopy($master, $month, 83, 290, 0, 0, imagesx($master), imagesx($master));

imagepng($master, null, 1);

?>

我曾尝试使用imagesavealpha(),但也不起作用。。有人有什么想法吗


谢谢你们,亲爱的,谢谢你们的帮助!很惊讶我没有意识到。。。但现在是早上7点,我整晚都没喝咖啡P
imagecopy($master, ..snip.. imagesx($master), imagesx($master));
                                    ^^^^^^^---should be $month
                                                    ^--- should be 'y'
                                                      ^^^^^^^--- also $month