如题,我用qrcode生成一张二维码图片,然后想把黑色二维码修改为蓝色二维码,背景色不变。
<?phpinclude "../qijiang/phpqrcode.php";if(isset($_POST['addSub']) && $_POST['addSub'] =='生成二维码'){$url="BEGIN:VCARDVERSION:3.0FN:".$_POST['chineseName']."NICKNAME:".$_POST['englishName']."ORG:".$_POST['companyName']."TITLE:TEL;TYPE=work:".$_POST['officeTel']."TEL:".$_POST['tel']."EMAIL:".$_POST['mail']."END:VCARD"; $filename_temp ="card.png"; $errorCorrectionLevel = 'L'; $matrixPointSize = 2; QRcode::png($url, $filename_temp, $errorCorrectionLevel, $matrixPointSize,4);$img = file_get_contents('card.png');$im = imagecreatefromstring($img);$indexColor=imagecolorexact($im,0,0,0);//echo "<script language='javascript'>alert('".$indexColor."');</script>";imagecolorset($im,$indexColor,0,0,255); echo "<img src=\"card.png\" alt="【imagecolorset】qrcode生成二维码后,想把黑色二维码改成蓝色" ><br/>";}?>
求救,新手。
已解决,忘保存这个图片了,唉。