"Sam Najafi" <[EMAIL PROTECTED]> writes:

Hi Sam (and the PEL devel list)

> I'm working on enabling users to add entries or customizable fields
> into an Exif file rather than modifying metadata that is associated
> with an existing field or predefined image property. I was wondering
> if the PEL library has functions to allow me to do just that, or if
> not could you please enlighten me as how I should get around this
> problem!

So you want to use non-standard fields instead of the standard ones?
Then simply assign a tag value greater than 0xF000 to them. PEL will
then accept them as custom tags.

So something like this (coding off the top of my head...) should work:

  $entry = new PelEntryAscii(0xF123, 'This is my very own tag...');
  $ifd->addEntry($entry);

This wont work:

  $entry = new PelEntryAscii(PelTag::DATE_TIME,
                             'Hehe, a string in the length...');
  $ifd->addEntry($entry);

it will fail when such an image is stored and later loaded since PEL
will recognize the PelTag::DATE_TIME and expect it to be a proper
date. But if you stick to large tag values, then you should be safe.

It's not something which I've tested, but I think it works... please
report your findings back to me and the PEL devel list.

> Unfortunately I'm not very much knowledgeable in terms of Exif
> format and image compressions in general. Therefore your kind and
> valuable comment is greatly appreciated.
> 
> Kindest Regards,
> Sam

-- 
Martin Geisler  ---  <[EMAIL PROTECTED]>  ---  http://mgeisler.net

Read, write, create Exif data in PHP with PEL:       http://pel.sf.net
Take control of your webserver with PHP Shell:  http://phpshell.sf.net

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
PEL-devel mailing list
PEL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pel-devel

Reply via email to