"André M. Winter - Carto.net" <[EMAIL PROTECTED]> writes:

> hi,
>
> i am new to this list and rather new to PHP too so i am a little bit
> lost in the techie docs...
>
> i found edit-description.php in the examples folder and work with that
> one in order to get/add EXIF GPS information. getting and setting of
> already existing GPS info works fine so far with
>
> $gps = $ifd0->getSubIfd(PelIfd::GPS);
> $lat = $gps->getEntry(PelTag::GPS_LATITUDE);
> $lat->setValue(array(47,1),array(48,1),array(1234,100));
>
> (btw. it took long for me to figure out that the three arrays are
> not written as a 2-dimensional array whereas it is stored as such).

Yeah, I guess it's not entirely clear that is supposed to work :-(

I choose to represent rationals as 2-element arrays.  All the
setValue() functions take a variable number of arguments since Exif
tags can store more than just one value.  So in your case you're
storing three rationals, and thus need three arrays.

When you read the value out again you get a 3-element array back, each
element is then a 2-element array (a rational).

If somebody has an idea for a better API for this, then I'll be very
interested in hearing about it!

-- 
Martin Geisler                                     GnuPG Key: 0x7E45DD38

PHP Exif Library      |  PHP Weather             |  PHP Shell
http://pel.sf.net/    |  http://phpweather.net/  |  http://mgeisler.net/
Read/write Exif data  |  Show current weather    |  A shell in a browser

Attachment: pgpSrLLRysPct.pgp
Description: PGP signature

Reply via email to