Strahinja Sarovic <[EMAIL PROTECTED]> writes: Hi Strahinja,
Thanks for asking, but please send such questions to the PEL mailing list: [EMAIL PROTECTED] You can subscribe here: https://lists.sourceforge.net/lists/listinfo/pel-devel There will be more people there who can help you, so you might get better and/or faster answers there! I'm sending this reply to the list -- please do the same. > I have one problem and need some help > What about jpeg that has no tags at all. Ok I can use something like > $ifd0 = new PelIfd(PelIfd::IFD0); > > but what to do with sub IFD-s, like EXIF. In short: I need to set > DATE_TIME_ORIGINAL on jpeg that does not have any tags at all See the edit_description.php example that comes with PEL: http://pel.svn.sf.net/viewvc/pel/trunk/examples/edit-description.php In the case where there is no Exif data in the image, then the code basically does $jpeg = new PelJpeg($filename); $exif = new PelExif(); $jpeg->setExif($exif); $tiff = new PelTiff(); $exif->setTiff($tiff); $ifd0 = new PelIfd(PelIfd::IFD0); $tiff->setIfd($ifd0); $desc = new PelEntryAscii(PelTag::IMAGE_DESCRIPTION, $description); $ifd0->addEntry($desc); $jpeg->saveFile($output); To add sub-IFDs you do this after $ifd0 has been created (untested, I don't have a PEL installation at hand to try it out): $sub_exif = new PelIfd(PelIfd::EXIF); $ifd0->addSubIfd($sub_exif); The Exif standard has the information you need on the exact structure of the sub-IFDs: http://exif.org/Exif2-2.PDF I hope this helps a bit. -- Martin Geisler Do your secure multi-party computations (SMPC) with VIFF, the Virtual Ideal Functionality Framework. Download at http://viff.dk/ ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ PEL-devel mailing list PEL-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pel-devel