PHP 8.1.0 Released!

Imagick::getImage

(PECL imagick 2, PECL imagick 3)

Imagick::getImageReturns a new Imagick object

Description

public Imagick::getImage(): Imagick

Returns a new Imagick object with the current image sequence.

Parameters

This function has no parameters.

Return Values

Returns a new Imagick object with the current image sequence.

Errors/Exceptions

Throws ImagickException on error.

add a note add a note

User Contributed Notes 1 note

up
1
Abe
6 months ago
<?php
 
// Create a new imagick object
$imagick = new Imagick();
 
// Read the image
$pngfn='myfile.png';
$imagick->readImage($pngfn);
 
// Display the image
header("Content-Type: image/png");
echo
$imagick->getImageBlob();
?>
To Top