• Notes about Plone4ArtistsImage

last modified July 26, 2007 by EricBrian

To create this product, we cloned:

  • p4a.audio -> p4a.image
  • p4a.ploneaudio -> p4a.ploneimage
  • Plone4ArtistsAudio -> Plone4ArtistsImage.
These are not included in the EXTERNALS.txt of Plone4ArtistsSite, so we can work on them w/out breaking anyone else's running buildout.

The product should adapt both ATImage and ATFile.  For the first pass, however, we are only handling ATImage.  Eventually it would be good to enhance ATImage and ATPhoto types, as well as ATImage and ATFile.

We added a thirdparty directory to add handlers for metadata parsers.  We currently have parsers for EXIF and IPTC. 

For EXIF we used this library and it worked well for extracting the GPS as well as all the other data:  http://sourceforge.net/projects/exif-py/

For IPTC we used this library:  http://cheeseshop.python.org/pypi/IPTCInfo/1.9.2-rc5

One of the key features we want p4a.ploneimage to provide is geospatial awareness - the lat/long of the photo (or other type of image).  This can come from the camera and be in the jpeg/tiff metadata; alternatively, users should be able to add it later in Plone.  (Adding it in Plone should also add it to the jpeg/tiff.)  We want this lat/long information to be compatible with the other Plone GIS products - like PrimaGIS and the Maps product (that provides Google Maps mashup capabilities).  Sean Gillies says to use the IGeoItemSimple interface, defined here:  http://trac.gispython.org/projects/PrimaGIS/browser/zgeo.geographer/trunk/zgeo/geographer/interfaces.py  More info from Sean:  "We've got parallel OGC WFS and Atompub projects starting. They are going to share the interfaces in zgeo.geographer. So, ideally, anything that implements IGeoItemSimple can be output to desktop GIS, or served up as GeoRSS/KML for the web."

As of the end of the sprint, we have a working product that:

  • Intercepts and enhances ATImages that are added to a site with the product installed
  • Handles jpeg format
  • Extracts interesting EXIF and IPTC metadata fields from the image and adds this to the object in the same way Plone4ArtistsAudio does (as annotations)
  • Transforms the GPS coordinates into a human readable string, and a numeric representation that can be used with GoogleMaps et al.
  • Sets the image metadata title field as the Plone title, if it exists
  • Ditto the image caption field as the Plone description
  • image_view template provides all image metadata plus links to view the location in GoogleMaps et al.
  • When these fields are edited in Plone they are currently NOT stored back on the image. 

The features that need to be added to this product are captured in TODO.txt in the docs directory of the p4a.image product.  Key features that are needed include:

  • Saving edits to metadata on the image
  • Handling GIF and TIFF formats
  • Creating a thumbnail using PIL if it does not exist already on the image
  • Finish IGeometry and IGeoSimpleItem interfaces
  • Make container view look like a photo album (we didn't devote any attention to containers)
  • Provide slideshow for container view
  • Provide capability of editing GPS coordinates of the image via an embedded Google Map
  • Extend ATFile in addition to ATImage
  • Refactoring
  • TESTS


Image Container MockUps

Attached are mock ups of the image container that I am proposing. In addition to the icons on top, as Nate suggested, add the capability to change view in the display drop down. Also attached is the current/implemented P4A Image - image view.