I'm generating a barcode with PEAR::Image_Barcode which uses GD, but I need to write that barcode onto a section of a PDF and PHP/Imagick seems to be the easiest way to do that, is there any way to convert a GD image object into something Imagick can work with?
here we go:
ob_start();
Image_Barcode::draw($barcode, 'upca', 'gif');
$couponBarcode = ob_get_contents();
ob_end_clean();
$second = new Imagick();
$second->readImageBlob($couponBarcode)
it's writing the image to an output buffer with GD then reading that variable into an Imagick object
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With