79176468

Date: 2024-11-11 05:12:58
Score: 1
Natty:
Report link

I struggled to get this to work with the current accepted answer. I needed to use "getImagesBlob" to output the data and it works!

$imagick = new Imagick();
$imagick->readImageBlob( $file_content );
$imagick->resetIterator();
$img = $imagick->appendImages(true);
$img->setImageFormat("png");

$blob = $img->getImagesBlob();

You can then output the blob to the server if you wish using the below:

header("Content-Type: image/png");
header("Content-Length: " . strlen( $blob ) );

echo $blob;
Reasons:
  • Blacklisted phrase (0.5): I need
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: Jason Stockton