CreateQr($blibase,$number,abs($rec),$number.'qr_pay.png');
png2jpg ("/tmp/$number"."qr_pay.png","/tmp/$number"."qr_pay.jpg",100);
$b=fopen("/tmp/$number"."qr_pay.jpg","rb");
$imgData=getimagesize("/tmp/$number"."qr_pay.jpg");
$newImage="";
$newImagePre="{\\*\\shppict{\\pict \\jpegblip \\picw".$imgData[0]." \\pich".$imgData[1]." \\wbmbitspixel24 ";
while (!feof($b)) {
$newImage.= fgets($b);
}
$hex=bin2hex($newImage);
$imgDat=$newImagePre.$hex."}}";
// $temp .$imgDat;
$temp = str_replace("!qrkode!", $imgDat, $temp);
function png2jpg($originalFile, $outputFile, $quality) {
$image = imagecreatefrompng($originalFile);
imagejpeg($image, $outputFile, $quality);
imagedestroy($image);
}