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::hasPreviousImageImagick::identifyImage>
^ImagickLast updated: Mon, 26 Oct 2026

Imagick::identifyFormat

(PECL imagick 3 >= 3.3.0)

Imagick::identifyFormat — Formats a string with image details

Description

public function Imagick::identifyFormat(string $embedText): string|false

Replaces any embedded formatting characters with the appropriate image property and returns the interpreted text. See http://www.imagemagick.org/script/escape.php for escape sequences.

Parameters

embedText

A string containing formatting sequences e.g. "Trim box: %@ number of unique colors: %k".

Return Values

Returns format or false on failure.

Examples

Example #1 Imagick::identifyFormat()

<?php
        $output = "Output of 'Trim box: %@ number of unique colors: %k' is: <br/>";
        $imagick = new \Imagick(realpath("./images/artifact/mask.png"));
        $output .= $imagick->identifyFormat("Trim box: %@ number of unique colors: %k");

?>


<Imagick::hasPreviousImageImagick::identifyImage>
^ImagickLast updated: Mon, 26 Oct 2026