zenphoto forums » Feature Requests

EXIF import, Geotagging, RSS, Atom and Google Earth export

(49 posts)

Tags:

  1. rakaz

    Junior
    Joined: Jun '06
    Posts: 7

    I created a couple of patches for ZenPhoto to add some much requested functionality.

    First of all, I created a patch that adds EXIF reading capabilities to ZenPhoto itself. It adds some simple functions that theme authors can use print formatted EXIF information. The rest is handled completely transparently. One important difference between other solutions for EXIF reading is that the data is filtered beforehand. This ensures that the output of the functions are actually useful to be displayed, and not the raw data that is stored in the JPEG file.

    One of the area I payed some extra attention to is the support of Geotagging. If present, the EXIF patch reads the Geotagging information in JPEG files and transforms it to a format that is used by the various map APIs such as Yahoo Maps and Google Maps and Google Earth. An example of what can be done with the Geotagging information can be found on my own gallery. Just click on the ‘Toon locatie’ button in the bottom left of the page: http://nielsenwilma.nl/italy/DSC02083.JPG

    I also added RSS and Atom output. The RSS output should be compatible with iTunes (not tested yet) and includes MediaRSS information which is compatible with Flickr. Reading the RSS output in FeedDemon for example shows thumbnails, descriptions and dates for every photo. The RSS output also includes the Geotagging information (if applicable) using the ICBM extension. Examples:
    http://nielsenwilma.nl/trier.rss
    http://nielsenwilma.nl/scotland.atom

    Finally I also added KML export for use in Google Earth. For every geotagged picture it places a small thumbnail on the map, and if you click on the thumbnail it will open a larger version of the picture and the description and a link back to the ZenPhoto gallery. Example:
    http://nielsenwilma.nl/scotland.kml

    I’ve added the patches to the bugtracker, so perhaps these functions will be included in a future version of ZenPhoto.

    Posted 8 years ago #
  2. -Stash-

    Apprentice
    Joined: Jul '06
    Posts: 2

    Some of that stuff looks very good, it would be great if it could be added to the list of (2) patches on the "plugins" page (http://www.zenphoto.org:8080/confluence/display/PLUG/Home).

    Posted 8 years ago #
  3. gerwitz

    Apprentice
    Joined: Feb '07
    Posts: 2

    This is the one featureset that has kept me using Gallery2. I do believe I'll be trying out zenphoto now that I've found this!

    Posted 7 years ago #
  4. mannkind

    Member
    Joined: Apr '07
    Posts: 31

    Do these patches still exist somewhere? I have looked at your demo galleries and I am very interested in the patches for ZenPhoto. I've recently started to geocode my photos and would love to have these features available in ZenPhoto.

    Posted 7 years ago #
  5. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    @mannkind-

    I'm not sure. I haven't seen those in quite a while. I fiddled with them when they were released, but the problem is they require modifications to zenphoto core code in versions earlier than zenphoto v1.0.3, and I don't think they'll work right in the newer zenphoto versions. So even if you were to get the code for them, they may not work at all since zenphoto's core code has changed.

    Tristan might have saved those somewhere before the old confluence pages went away, but I'm not sure.

    There is no reason why the zenphoto EXIF implementation that is being worked on now can't be extended at some point to include geotagging, but the EXIF library would have to be set up to support it.

    For now, you can use the latest SVN code (rev 438) to include EXIF viewing capability, and I hope to work with Tristan (the developer) to get more theme functions written for EXIF stuff shortly.

    You can see an example here:
    http://www.bushwoodworking.com/zenphoto/projects/bushwoodtools/markingknives/IMG_2901.JPG.php#
    (click on the EXIF Data link below the image)

    This uses the new Zenphoto EXIF implementation to display the EXIF tags in my images.

    For the RSS piece, I have RSS working here:
    http://www.bushwoodworking.com/zenphoto/index.php?p=latest

    This is not using official zenphoto code yet though, this is a hack I built from things I found around the forums here. I'd be glad to share if you want.

    Posted 7 years ago #
  6. mannkind

    Member
    Joined: Apr '07
    Posts: 31

    @thinkdreams

    Thanks for the information. I would be interested in seeing the code you wrote/collected for displaying the EXIF data -- that is, if you don't mind sharing it.

    I really am interested in the geo-spatial data, displaying of maps w/photos, and Google Earth kml downloads. I figured that the code wouldn't be entirely compatible with the newest ZenPhoto but I'm not afraid of coding. Heck, for awhile there I was even writing my own photo album software all because I wanted support for 'tags'. I came up with the following demo of real working code after working on it for about 2 weeks (evenings, after work):

    http://www.thenullpointer.net/wordpress/wp-content/uploads/2006/12/tnppg-project-video.mov

    Seeing Rakaz's demo has me excited about ZP once more -- I'd really love to give it a try.

    Posted 7 years ago #
  7. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    Well, hopefully someone still has the older EXIF stuff by rakaz laying around somewhere.

    Which code would you like from me? Since I'm heavy into the new EXIF functionality work, I'm not using the older hacky EXIF stuff. If you would like a copy of the old stuff, I can send it to you (although it doesn't do anything more than the the newer integrated EXIF we're working on)

    Posted 7 years ago #
  8. Zenphoto development team
    trisweb

    Project Manager
    Joined: Sep '05
    Posts: 1,843

    mannkind, the new EXIF library we're using should be able to get any metadata you want out of an image, so perhaps we can use it and integrate some of Rakaz's old code, because that stuff looks downright awesome.

    I can't believe I missed it when it came up before... it's really good stuff! The future of online galleries IMHO... when all cameras will have little GPS recievers in them, every gallery could be like this!

    Posted 7 years ago #
  9. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    Rakaz's stuff was pretty cool if I recall. I made an attempt early on to use it, but couldn't get it to work right. It required some modifications to your code Tris, and some htaccess changes as well.

    Do you have any backup copies of it from the old confluence web stuff?

    Posted 7 years ago #
  10. Zenphoto development team
    trisweb

    Project Manager
    Joined: Sep '05
    Posts: 1,843

    Yeah, I do, I've been meaning to extract meaningful stuff from them. Problem is that I need to set up a local confluence to do it :-( so it's kinda a hassle, not too bad though. I'll see if I can do that soon...

    Posted 7 years ago #
  11. mannkind

    Member
    Joined: Apr '07
    Posts: 31

    @thinkdreams
    Oh, maybe I mis-understood what you were saying. I should just checkout the SVN repo to get the cool EXIF stuff.

    @trisweb
    I'm *really* happy to see that you're interested in integrating the visualization of the geo-spatial data into ZP. I would be more than happy to help out in the effort. I'll be checking out the SVN this weekend to see how the EXIF stuff is coming along.

    Re: Cameras with GPS
    One neat thing is there is software available for almost every platform that allows you to select a photo/photos and geocode them manually using Google/Yahoo Maps. While I use a GPS for my newest photos, being able to go back to older photos and say, "This group of photos was taken ::click:: there" is *very* neat.

    Posted 7 years ago #
  12. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    @mannkind-

    If you want, you can check out the library that is being used to do the EXIF stuff. It might be able to be extended to include the Geotags. It's located under the /zen/exif folder I believe.

    What camera manufacturers and models support that sort of tagging now?

    Posted 7 years ago #
  13. mannkind

    Member
    Joined: Apr '07
    Posts: 31

    @thinkdreams
    IIRC there is only 1 camera that actually has a GPS in it. For everyone else (like myself) the photos are geocoded with programs (either Automated or point-n-click on a map).

    The EXIF specification has fields for GPS Information -- here is an example from one of my geocoded photos:

    • GPSVersionID: 2,2,0,0
    • GPSLatitudeRef: N
    • GPSLatitude: 47 4810.3752
    • GPSLongitudeRef: W
    • GPSLongitude: 122 2922.92
    • GPSAltitudeRef: Sea level
    • GPSAltitude: 75/1 meters
    • GPSMapDatum: WGS-84

    I'll be checking the library out in a couple hours. I'm hoping it can do the deed.

    Posted 7 years ago #
  14. mannkind

    Member
    Joined: Apr '07
    Posts: 31

    @thinkdreams, trisweb
    I quickly found where ZP defines what EXIF data is being pulled, and added Lat/Long+Refs, Alt+Ref to the list.

    I then found the theme function that dumps the data and edited the testing template to dump the data.

    Hmmm...the EXIF library as is does formatting for *some* of the GPS fields, but not all of them. So I found myself thinking: What does Altitude Reference: 0 (or 1 -- only two possible values) mean? What does Altitude: 75 mean? Once I figured out what it stood for I added some extra formatting (following the same style the other formatting code uses) and now have 'Altitude Reference: Above|Below Sea Level' and 'Altitude: 75m'

    I'm very happy that the EXIF library used has the ability read GPS Data. As an example I placed a few of my recently geocoded photos online-- my SVN ZenPhoto album:

    http://mu.thenullpointer.net/Silverdale_Brewery_and_Geocaching_200704/IMG_0014.JPG.php

    Posted 7 years ago #
  15. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    That's nifty mannkind!

    Submit this to Tristan for his review. This would be perfect to add to the development code for EXIF.

    Cool. Zenphoto is just getting better all the time.

    Posted 7 years ago #
  16. mannkind

    Member
    Joined: Apr '07
    Posts: 31

    @thinkdreams, trisweb

    I'm not sure the proper channels to contact Tristan w/svn diffs.
    If you know or Trisweb responds, I'd be happy to send them along.

    Posted 7 years ago #
  17. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    Yes, Tris, I need to know the proper procedures as well. I have a couple diffs to submit to you as well with my minor tweaks (see other EXIF thread).

    Posted 7 years ago #
  18. mannkind

    Member
    Joined: Apr '07
    Posts: 31

    @thinkdreams

    Your code for the displaying of the EXIF data in a nicer way... might I sneak a peak? I'd be glad to give you my diff file for the geocoding if you were interested.

    (This is a sneaky way of bumping the thread -- I don't want it to get lost in the depths of time again)

    Posted 7 years ago #
  19. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    sure thing mannkind. give me a bit to zip up the files. it uses a very thin version of lightbox to pop up a display box. that's about the only thing I will use lightbox for, as it fits well into the theme without taking up too much space for the EXIF parameters.

    Posted 7 years ago #
  20. mannkind

    Member
    Joined: Apr '07
    Posts: 31

    @thinkdreams,

    I have searched your website for a way to email without luck.

    Perhaps we could continue our discussion outside of the forum. My email is: mannkind@gmail.com

    Posted 7 years ago #
  21. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    you can email me at thinkdreams@gmail.com. sorry. i've been incommunicado for a bit. work has been very busy.

    Posted 7 years ago #
  22. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    Well, first, here's what I used.

    http://blog.feedmarker.com/2006/02/12/how-to-make-better-modal-windows-with-lightbox/

    Second, keep an eye out in your inbox for my zip archive of the relevant files.

    Sorry it took me so long.

    Posted 7 years ago #
  23. Zenphoto development team
    trisweb

    Project Manager
    Joined: Sep '05
    Posts: 1,843

    Hey guys, sorry I've been away for so long... starting a company and all...

    If you want to submit diffs the best way is to open up a new enhancement issue on Trac and attach them. I like to keep everything there, and I'll be notified when you do it and will be sure to integrate your changes.

    I love that Google map on the image page. Very cool.

    Posted 7 years ago #
  24. dspnorman

    Member
    Joined: May '07
    Posts: 46

    thinkdreams and mannkind,

    this stuff is great, exactly what I'm looking to implement in a current project.

    any progress getting your diffs accepted?

    thanks!

    Posted 7 years ago #
  25. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    @dspnorman-

    EXIF is a great addition to zenphoto. However, Tris is currently the only one with commit access to SVN. We are working on the possibility of additional SVN commit privileges from him, but he is very busy with his new endeavor.

    Where it stand right now, I have completed the ability for zenphoto to display EXIF tags from within the EXIF library built into zenphoto. Tris was starting the method by which the tags could then be written to the database for each image, thereby "caching" the information for each image in the DB instead of calling it from the image each time. However, since he has been quite busy, development on this has stalled. Without these methods, EXIF still works, but isn't fully integrated into the DB. I have a working concept on my site (http://www.bushwoodworking.com/zenphoto) using the latest SVN code, but haven't gone any further than that.

    And that's where we're at today. I'd be happy to share everything I have to this point.

    Posted 7 years ago #
  26. dspnorman

    Member
    Joined: May '07
    Posts: 46

    Cool, thanks.

    I just found the mannkind's ticket with a diff to add google map location support with gps exif, which I'll definitely be making use of. I'm very new to subversion, though, so I'm not quite sure how to merge this in with my installed trunk.

    Posted 7 years ago #
  27. dspnorman

    Member
    Joined: May '07
    Posts: 46

    thinkdreams, is the EXIF display on your site using the functions in r441 (trunk/zen/exif/), or do you have a lot of customized stuff?

    I don't need to use the lightbox style display, but if your implementation offers other benefits to the current trunk, I'd be very interested in learning how to incorporate it.

    thanks!

    Posted 7 years ago #
  28. dspnorman

    Member
    Joined: May '07
    Posts: 46

    @mannkind-

    I'm trying to use your patch from ticket #78, but I'm not sure how to run the patch command.

    I'm running SVN r441, and put trunk.zen.diff in the root folder, then ran: patch -p1 < trunk.zen.diff, but get this:
    [~/zenphoto/trunk]# patch -p1 < trunk.zen.diff
    can't find file to patch at input line 5
    Perhaps you used the wrong -p or --strip option?
    The text leading up to this was:
    --------------------------
    |Index: themes/testing/album.php
    |===================================================================
    |--- themes/testing/album.php (revision 441)
    |+++ themes/testing/album.php (working copy)
    --------------------------
    File to patch:

    I know I'm doing something wrong, just don't know what!

    Posted 7 years ago #
  29. thinkdreams

    Contributor
    Joined: Jun '06
    Posts: 653

    My EXIF stuff is completely stock using the newer EXIF libraries that Tris helped me get set up just before he went AWOL. ;) The EXIF stuff I'm using now is coded within the Zenphoto library system rather than being a hack, although it still only displays and doesn't include any database caching or image rotation functionality, which we had always talked about coming later.

    The SVN is complete enough to display EXIF tags just fine (the lightbox functions are theme based and just something I came up with to display the EXIF tags in a non-intrusive manner). The function <?php printImageEXIFdata(); ?> is what you'll want to refer to to obtain the tags in your theme. You can find it in the template-functions.php file for more detail.

    Looking at the 441 SVN revision however, it looks like the printImageMetadata function replaces the printImageEXIFdata. I am not on the latest revision, so I may have to remedy that at some point so we're all comparing apples to apples. :)

    Shouldn't change much though on the display side of things. Let me know how I can help further.

    Posted 7 years ago #
  30. dspnorman

    Member
    Joined: May '07
    Posts: 46

    Thanks thinkdreams. I'm slowly getting the hang of the template stuff.

    If you know where I'm going wrong trying to apply that patch, I'd appreciate any insight.

    Posted 7 years ago #

RSS feed for this topic

Reply »

You must log in to post.