怎么样让PHP组合多张图片并生成保存到指定目录?

$ArticleCount=1;$scene_id=$user_id;`scene_id`='$scene_id'");$time="qrcode$scene_id";$... $ArticleCount = 1;
$scene_id = $user_id;
`scene_id`='$scene_id'");

$time="qrcode$scene_id";
$scene=$user_name;
$imgsrc = "../images/qrcode/1.jpg";
$h_imgsrc="../images/qrcode/head/2.jpg";
$width = 230;
$height = 230;
$name=imagecreatefromjpeg($imgsrc,$width,$height,$time);
$imgs = $name;
$width = 100;
$height = 100;
$h_time=$time."_1";
$h_name=imagecopyresized($h_imgsrc,$width,$height,$h_time);
$h_imgs = $h_name;
$target = '/qrcode/hanghaijia.jpg';//背景图片
$target_img = Imagecreatefromjpeg($target);
$source = Imagecreatefromjpeg($imgs);
$h_source = Imagecreatefromjpeg($h_imgs);
imagecopy($target_img,$source,155,462,0,0,230,230);
imagecopy($target_img,$h_source,60,28,0,0,100,100);
$fontfile = "simsun.ttf";
$yaoq = "我是邀请码";
$textcolor = imagecolorallocate($target_img, 255, 255, 55);
imagettftext($target_img,12,0,248,738,$textcolor,$fontfile,$yaoq);
#水印文字
$nickname = "我是用户名";
#打水印
$textcolor = imagecolorallocate($target_img, 0, 0, 255);
imagettftext($target_img,18,0,268,59,$textcolor,$fontfile,$nickname);

Imagejpeg($target_img,'/qrcode/1.jpg','/qrcode/');
请问怎么样让它生成图片及保存在指定目录呢?谢谢,只有50分了,或者有什么好的代码,
展开
 我来答
匿名用户
2015-06-27
展开全部
//调试是否生成gif图片
//header( "Content-Type: image/gif" );
//echo( $animation->getImagesBlob() );

//新图片文件名组合
$images = $qian . time(). '.' . $type;

//生成图片
$animation->writeImages( $images,true );

//保存都指定目录
copy($images, $path . $images);

//是否预览
if($is)
{
echo '已生成gif图片: ' . $images . '<br />';
echo "<img src='" . $path . $images . "' />";
}
else
{
echo '已生成gif图片: ' . $images . '<br />';
}

//删除最先保存的图片
unlink($images);
}
博思aippt
2024-07-20 广告
作为深圳市博思云创科技有限公司的工作人员,对于Word文档生成PPT的操作,我们有以下建议:1. 使用另存为功能:在Word中编辑完文档后,点击文件->另存为,选择PowerPoint演示文稿(*.pptx)格式,即可将文档内容转换为PPT... 点击进入详情页
本回答由博思aippt提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式