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:

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:

In the case where there is no Exif data in the image, then the code
basically does

  $jpeg = new PelJpeg($filename);

  $exif = new PelExif();

  $tiff = new PelTiff();

  $ifd0 = new PelIfd(PelIfd::IFD0);

  $desc = new PelEntryAscii(PelTag::IMAGE_DESCRIPTION, $description);


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);

The Exif standard has the information you need on the exact structure
of the sub-IFDs:

I hope this helps a bit.

Martin Geisler

      Do your secure multi-party computations (SMPC) with VIFF,
              the Virtual Ideal Functionality Framework.
                     Download at

SF.Net email is sponsored by:
Check out the new Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
PEL-devel mailing list

Reply via email to