Hello, I am trying to create a new image using a background image and the qrcode. I dont want to have to write the qrcode into the file system. PHP has an imagecreatefromstring, I think that will work, but I need a way to get the actual data of th qr an not ECHO it to the browser.
$im_template = imagecreatefrompng("assets/background.png");
$im_qrcode = imagecreatefromstring( QRcode::png('1234')); //HOW??
imagecopymerge($im_template, $im_qrcode, 10, 10, 0, 0, 100, 47, 75);
This seem to work, I hope there is a better way
ob_start();
QRcode::png('Hello');
$qrcodeContent = ob_get_contents();
ob_end_clean();
Unfortunately my prev. solution with the ob_start causes weird problems.