php8.5
Home/ Manual/ image / functions/ iptcparse

iptcparse

PHP function Edit on GitHub ✎

(PHP 4, PHP 5, PHP 7, PHP 8)

Parse a binary IPTC block into single tags

Description

iptcparse(string $iptc_block): array|false

Parses an IPTC block into its single tags.

Parameters

iptc_block

A binary IPTC block.

Return Values

Returns an array using the tagmarker as an index and the value as the value. It returns false on error or if no IPTC data was found.

Examples

iptcparse() used together with getimagesize()

php
<?php
$size = getimagesize('./test.jpg', $info);
if(isset($info['APP13']))
{
    $iptc = iptcparse($info['APP13']);
    var_dump($iptc);
}
?>

Notes Notrequired

Source: reference/image/functions/iptcparse.xml · from the official PHP manual (php/doc-en)