PHP - get .PNG title and description from EXIF/XMP - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Tuesday, September 27, 2022

PHP - get .PNG title and description from EXIF/XMP

What is a simple solution to get/read the EXIF/XMP (title & description & tags) with PHP from a .PNG-image-file without a additional library? I saw a few similar questions but mostly only with additional libraries. Like this working .jpg example, as simple as (?):

$size = getimagesize ($photo,$info);        
$iptc = iptcparse ($info["APP13"]);
if(isset($iptc["2#005"][0]) and $iptc["2#005"][0]!=""){
title=$iptc["2#005"][0]);
..


source https://stackoverflow.com/questions/73858430/php-get-png-title-and-description-from-exif-xmp

No comments:

Post a Comment