查看文件: memberimg.php
大小: 1.8 KB
类型: application/octet-stream
<?php //require_once('../Connections/BE2.php'); ?> <?php include "../phpqrcode/qrlib.php"; //QRcode::png($_GET['qr']); $uri='http://www.skybni.com/ecard/ag35882'; //https://www.skybni.com/ecard/ag35882 1422X800 $backColor = 0xFFFFFF; $foreColor = 0x0e17cc ; $f= "/www2/skybni/test007/tmpimgs/".date('YmdHis').'.png' ; $sf= "/www2/skybni/test007/tmpimgs/".date('YmdHis').'_ag35882.png' ; QRcode::png($uri, $f, QR_ECLEVEL_L, 2, 3, false, $backColor, $foreColor); //62X62 $i=0; while ($i<50) { if(file_exists($f)){ break; } sleep(0.25); $i++; } $srcqrcode = imagecreatefrompng($f); $dest = imagecreatefrompng('member_backgroud.png'); $filename="/www2/skybni/test007/user_0000441.jpg"; list($width, $height) = getimagesize($filename); $src = imagecreatefromjpeg($filename); //b1=440X340 . user_0000441.jpg =1422X800 $thumb = imagecreatetruecolor(440, 340); imagecopyresized($thumb, $src, 0, 0, 0, 0, 440, 340, $width, $height); imagealphablending($dest, false); imagesavealpha($dest, true); imagecopymerge($dest, $thumb, 15, 120, 0, 0, 440, 330, 100);//470X700 440X330 imagecopymerge($dest, $srcqrcode, 318, 538, 4, 4, 65, 65, 100);//470X700 440X330 $gray = 0x323232; // ImageColorAllocate($im, 200,200,200); $myfont="/www2/skybni/fonts/kaiu.ttf"; $text='MILNAS安心超市'; ImageTTFText($dest,14,0,18,495, $gray,$myfont,$text); $text='會員編號:'; ImageTTFText($dest,14,0,370,495, $gray,$myfont,$text); $text='團購經理 潘盈芝 Serena' ;//'南港路' ;//substr($authnum,$c,1); ImageTTFText($dest,14,0,18,522, $gray,$myfont,$text); $text='ag35882'; ImageTTFText($dest,14,0,385,522, $gray,$myfont,$text); header('Content-Type: image/png'); imagepng($dest,$sf); imagepng($dest); imagedestroy($dest); imagedestroy($src); imagedestroy($thumb); unlink($f); ?>
保存
取消
返回文件列表