Jump to content

Change EXIF Data with PEL


memaster

Recommended Posts

Hallo

I want to change EXIF-Data of a JPG Image. I found the PEL-Lib but I can't get it running. I tried to Code

 

<?php
require_once('pel/PelJpeg.php');

  $jpeg = new PelJpeg('fff.jpg');

  $exif = $jpeg->getExif();

  if ($exif != null) {
    $tiff = $exif->getTiff();
      $ifd0 = $tiff->getIfd();
      if ($ifd0 == null)
           echo "Sorry --- no Ifd data found.";
      $desc = $ifd0->getEntry(PelTag::IMAGE_DESCRIPTION);
      if ($desc == null)
           echo "Sorry --- no Entry data found.";
    echo 'The description: ' . $desc->getValue();


  } else {
    echo "Sorry --- no Exif data found.";
  }
?>

 

But the output is always "Sorry --- no Entry data found.". Can someone help me?

 

Thanks

 

Link to comment
https://forums.phpfreaks.com/topic/43795-change-exif-data-with-pel/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.