Overview
KB
Technical FAQ
PHP Manual
CSS2 Manual
HTML Manual
JS Guide
JS Reference
PhpDock Manual
Nu-Coder Manual
PhpExpress Manual
PHP Joomla
Development
Learn PHP
 
<Imagick::writeImageImagick::writeImages>
^ImagickLast updated: Mon, 26 Oct 2026

Imagick::writeImageFile

(PECL imagick 2 >= 2.3.0, PECL imagick 3)

Imagick::writeImageFile — Writes an image to a filehandle

Description

public function Imagick::writeImageFile(resource $filehandle, string $format = ?): bool

Writes the image sequence to an open filehandle. The handle must be opened with for example fopen. This method is available if Imagick has been compiled against ImageMagick version 6.3.6 or newer.

Parameters

filehandle

Filehandle where to write the image.

format

The image format. The list of valid format specifiers depends on the compiled feature set of ImageMagick, and can be queried at runtime via Imagick::queryFormats().

Return Values

Returns true on success.

See Also


<Imagick::writeImageImagick::writeImages>
^ImagickLast updated: Mon, 26 Oct 2026