php8.5
Home/ Manual/ imagick / imagick/ Imagick::identifyFormat

Imagick::identifyFormat

PHP function Edit on GitHub ✎

(PECL imagick 3 >= 3.3.0)

Formats a string with image details

Description

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 formatFalseforfailure.

Examples

Imagick::identifyFormat()

php
<?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");

?>

Source: reference/imagick/imagick/identifyformat.xml · from the official PHP manual (php/doc-en)