I can't seem to figure out how to add XP_TITLE and XP_COMMENT to images
that already have some exif data.  I'm able to edit the XP_TITLE and
XP_COMMENT fields if they already exist in the image (because I moved
them in PelIfd from EXIF to IFD1, but I can't add them to an image for
some reason.  It just comes out as question marks.  I was hoping someone
would be able to assist?

The code I'm currently using is this, but it's obviously wrong :)

$title = $ifd0->getEntry(PelTag::XP_TITLE);

if ($title != null) {
    // this part works just fine if the tag is already there.
    $title->setValue($exifTitle);
} else {
    // this part doesn't work.
    $newTitle = new PelEntryUndefined(PelTag::XP_TITLE, $exifTitle);
    $ifd0->addEntry($newTitle);
}


Thanks in advance!

Garrison


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
PEL-devel mailing list
PEL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pel-devel

Reply via email to