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

Hi Sam

Good to hear from you!

I'm sending the reply to the PEL devel list as well as to you in the
hope that others will join into the discussion (and for archiving
purposes). I hope you don't mind. You can subscribe here:


You can also read/write to it from Gmane:


> I try to use your PEL library - but I'm running into problems.
> The first was that
> are defined twice in PelTag.

Please use the code from Subversion, it has fixes for that problem and
maybe others as well :-) Someone (well, I guess that would be me...)
really ought to put out a new version... :-)

> I removed the spare copies and it started working. With the help of
> your examples, I was able to write the image description - but I'm
> not yet able to change the GPS fields (that's what I really want to
> do). In the beginning, my image has IFD0 and IFD1 - but not the GPS.
> I add the GPS one with the help of
> $gps = new PelIfd(PelIfd::GPS);
> and then set
> $ifd1->setNextIfd($gps);

Ahh, I might know what the problem is.  At first I thought that it
looked good, but then I remembered: the GPS IFD is a sub-IFD and you
must add it with the addSubIfd() method:


I'm sorry that this isn't better documented, at the moment PEL
unfortunately requires a too big knowledge about the ins and outs of
the EXIF format.

I would of course love to see people contribute functions to make PEL
more high-level. It's a bit like C: it is a lot easier to write stuff
in C than assembly. But even then people tend to use libraries (nobody
wants to invert their own printf()).

Likewise, it's (hopefully!) easier to manipulate the bits and bytes
using PEL than doing it directly, but we need some "libraries" to put
ontop of it in the form of more high-level convenience functions.

> This seems to work nicely. But now, I need to save this change -
> meaning I'd like to have an image with a GPS IFD. To do so, I use
> function saveImage($url, $file) {
>     file_put_contents($url, $file->getBytes());
> }
> To load the image, I use more or less your example from
> edit-description.php. What is going wrong??
> Do you have an example were you add a GPS IFD to the image and save
> it??

No, unfortunately not... the GPL stuff is rather new and untested
since I haven't found any actual images with GPS info in them, and I
have no GPL equiptment myself. So it's written from the specs...

I'm normally testing using the 'exif' program from the C libexif. That
library was the starting point for PEL.

Please let us know if you get it to work --- I'm always interested in
new examples for PEL. 

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
PEL-devel mailing list

Reply via email to