0

我是php的菜鸟。

$qrImage = imagecreatefrompng($filename);
$tempImage = imagecreatefrompng("image/facebook.png");
$LogoImage = imagecreatetruecolor($matrixPointSize*5, $matrixPointSize*5);

// Resize Logo.
imagecopyresampled($LogoImage, $tempImage, 0, 0, 0, 0, imagesx($LogoImage), imagesy($LogoImage), imagesx($tempImage), imagesy($tempImage));

$src_x = (imagesx($qrImage)/2)-(imagesx($LogoImage)/2);
$src_y = (imagesy($qrImage)/2)-(imagesy($LogoImage)/2);

imagecopymerge($qrImage, $LogoImage, $src_x, $src_y, 0, 0, $matrixPointSize*5, $matrixPointSize*5, 90);

header("Content-Type: image/png");
imagepng($qrImage);

使用此代码图像看起来像

在此处输入图像描述

我想将徽标放在 qrCode 图像的背景上。

有没有办法将此图像保存为 svg 文件?

有谁能够帮我??

4

0 回答 0