How to create and to merge a 2D transparent barcode on top of a JPG image in PHP? -
could please see below code , let me know how write $png
on top of $jpg
image? code shows bacode image in browser, not save , merge $jpg
image. taking time , help.
$jpg= imagejpeg($image, '/applications/ampps/www/files/final-image-2.jpg'); require_once(dirname(__file__).'/tcpdf/tcpdf_barcodes_2d.php'); // set barcode content , type $barcodeobj = new tcpdf2dbarcode('hello-this-is-a-test', 'datamatrix'); // output barcode png image $barcodeobj->getbarcodepng(6, 6, array(0,0,0)); // code stops work here $png= imagepng($barcodeobj, '/applications/ampps/www/certificates/barcode.jpg'); imagecopymerge($png, $jpg, 0, 0, 0, 0, 50, 50, 100); imagedestroy($image); imagedestroy($png);
Comments
Post a Comment