IPTC/EXIF and Keywords
dankajh
Joined: 2005-11-11
Posts: 3 |
![]() |
Sorry about my english b. If a photo does not have tags EXIF/IPTC: Well, the truth is that I do not know if I have explained it well, but it would be good that the same questions someone can divide them in mas clearer targets. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
a new g2 developer, ColoredPixels, is already working on an improvement of the exif module. a.1. yes, certainly. but someone has to step up and write the change. all/just some: doesn't matter, small difference. we can offer a GUI to let the user choose which tags to store. b.1. the new exif module will have write capabilities to write exif into images that didn't have exif tags before. |
|
dankajh
Joined: 2005-11-11
Posts: 3 |
![]() |
Would it be possible to view and participate in the improvemente of this module? |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
This is great news, of this possibility. But did I read the last one correctly, that "the new exif module will have write capabilities to write exif into images that didn't have exif tags before"? This is quite cool if yes... Anyway way to participate in this? valiant wrote:
a new g2 developer, ColoredPixels, is already working on an improvement of the exif module. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
as I see it, ColoredPixels will most probably cover the read/write exif module extension (multiple libs can be used, not just the current php based library which can only read, and is not very reliable at that). we'll see. of course you can add suggestions. e.g. if you find a php based exif/iptc library that can read and write exif / iptc and is reliable, that would be great. i'd welcome any help in extending the exif module to make exif / iptc tags searchable: |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Hello ! Would it be possible to extend the module to gather GPS information ? It would be nice for us if we could get GPS coordinate using the EXIF module via a function like getGPScoord($id) or something that would return it in the format longitude,latitude Thanks in advance |
|
drhiii
Joined: 2003-04-27
Posts: 397 |
![]() |
All sounds quite excellent. Will poke around for an iptc lib to do as you suggest. Another feature that extends beyond the searchable exif fields would be to extract from the EXIF and create or populate the description fields for G2, and for all the search engine bots that tear through sites looking for this meta information. valiant wrote:
as I see it, ColoredPixels will most probably cover the read/write exif module extension (multiple libs can be used, not just the current php based library which can only read, and is not very reliable at that). we'll see. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
we already exract the description from iptc into the item description at upload time. but this sure could be extended. |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
Termitenshort, there already is an interface in exif module that may help.. you can use it like this: list ($ret, $exif) = GalleryCoreApi::newFactoryInstance('ExifInterface_1_0'); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null, null); } if (isset($exif)) { list ($ret, $exifData) = $exif->getMetaData($itemIds); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null, null); } } See phpdoc in modules/exif/classes/ExifInterface_1_0.class |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
mindless wrote:
Termitenshort, there already is an interface in exif module that may help.. you can use it like this:list ($ret, $exif) = GalleryCoreApi::newFactoryInstance('ExifInterface_1_0'); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null, null); } if (isset($exif)) { list ($ret, $exifData) = $exif->getMetaData($itemIds); if ($ret->isError()) { return array($ret->wrap(__FILE__, __LINE__), null, null); } } Great thanks ! Is this interface gathering the GPS data ? I thought that the module included with gallery 2.0.1 did not have it. I will check. THanks a lot ! |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
The interface just returns the gathered exif data.. not sure if GPS is included in that. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Snif, I have checked and for some reason the EXIF module does not gather the GPS information Is there an easy way to get the additional parameters ? Thanks |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
exifTool (perl) (http://www.sno.phy.queensu.ca/~phil/exiftool/) supports the GPS extension of exif. coloredpixels is looking into this lib mostly because of its write capabilities. according to http://www.jakeo.com/software/exif/index.php so we just need to know where to look for it. Termitenshort |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
valiant wrote:
exifTool (perl) (http://www.sno.phy.queensu.ca/~phil/exiftool/) supports the GPS extension of exif. coloredpixels is looking into this lib mostly because of its write capabilities. Yes GPS data is stored in a different IFD, the "dirty hack" I made was extracting it via exif_read_data of php valiant wrote:
according to http://www.jakeo.com/software/exif/index.php No I have not tried that but I used the example above and output the all deal to a simple PHP page and couldn't see the GPS data. I also took a look at ExifHelper.class but I could not see any references to the GPS information, maybe I'm not looking in the right place ? Thanks |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
please link to an jpeg with gps exif data. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
valiant wrote:
please link to an jpeg with gps exif data. Here you go: http://termite.responsiveweb.com/gallery2/v/random/creamers.jpg.html?g2_navId=x4aad5203 This is test website |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
I got it !! I've added this $data['GPS/Latitude'] = array($gallery->i18n('GPS/Latitude'), 'GPS.Latitude'); To the exifhelper.class and I got the EXIF module to display the GPS coordinate (At least the latitude) :D I guess I need to modify the EXIF-module slightly (i hope it's not a big deal ?) ------------------------- |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
I guess I got excited to quickly ... Indeed I've got latitude and longitude but I cannot get the "reference" -> which makes my finding pretty useless 1 step forward 2 steps back ... |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
Allright ... fumbled a bit more (in the last few sec ...) and I found that this works: $data['GPS/Latitude'] = array($gallery->i18n('GPS/Latitude'), 'GPS.Latitude'); $data['GPS/Longitude'] = array($gallery->i18n('GPS/Longitude'), 'GPS.Longitude'); $data['GPS/LatitudeRef'] = array($gallery->i18n('GPS/Latitude Reference'), 'GPS.Latitude Reference'); $data['GPS/LongitudeRef'] = array($gallery->i18n('GPS/Longitude Reference'), 'GPS.Longitude Reference');
BUT i don't know how to format this Do you know how to format the output using the exifer library ? Thanks in advance |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
ok, seems you already found out that you can get it that way. and you get the GPS data for the image. @format: |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
valiant wrote:
@format: Well I wanted to have just a number. google is expecting a decimal xxx.xxxxxxxxxx for longitude and latitude. I made a dirty formula that transform the degree, etc to decimal but I know exifer can do it so i'd rather use the builtin function if possible Thanks for the quick reply Otherwise, is it ok if I modify the EXIF module or someone else should be doing it ? -------------------------- |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
hmm, i don't know the GPS formatting related features of exifer. i've now added all fields from exifer/makers/gps.inc to ExifHelper.class (not yet committed). see: http://dev.nei.ch/exifhelper_gps_diff.txt |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
ok, added the whole 31 keys. available in tomorrows nightly snapshot of G2. |
|
Termitenshort
![]()
Joined: 2005-10-09
Posts: 1894 |
![]() |
valiant wrote:
ok, added the whole 31 keys. available in tomorrows nightly snapshot of G2. NIICE ! Thanks a lot for this update it's gonna simplify the Map-module quite a bit for all exif related things :D thx a lot |
|
njacobs
Joined: 2003-10-06
Posts: 10 |
![]() |
Valiant, is the exif write module still being worked on? I would like to write copyright info to my pictures. coloredpixels should be working on it but I have no idea where to see the status of his work regards |
|
mindless
![]()
Joined: 2004-01-04
Posts: 8601 |
![]() |
we discussed some ideas a while back, but i haven't seen any progress on it. |
|
jcampbell1
Joined: 2005-10-26
Posts: 8 |
![]() |
There is a PHP Library that can write EXIF data located at http://pel.sourceforge.net/ . A problem is that it requires PHP5, and it is still beta. I have been playing around with it, I can sucessfully edit/add EXIF data, but I am not familiar enough with the gallery API to create a module. |
|
valiant
Joined: 2003-01-04
Posts: 32509 |
![]() |
anyone interested in improving this module, please check out: and let's coordinate who's doing what. we'll gladly guide you if you have questions or need help understanding the G2 API. |
|
joe7rocks
![]()
Joined: 2004-10-07
Posts: 560 |
![]() |
Just a quick note: it needs some additional steps, maybe finetune too, then i'll 'release' it here as it is. |
|