diff options
| author | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2012-04-15 21:44:31 +0200 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@users.sourceforge.net> | 2012-04-15 21:44:31 +0200 |
| commit | 713c2d86d9335a9c681357254d4bc4f817626259 (patch) | |
| tree | c4cabe1b7dcf1d2f192fdcfc68d35e242305c949 /templates | |
| parent | c5f23c17a14bbe07042f46be90fe2b2e465436c7 (diff) | |
| download | cataract-713c2d86d9335a9c681357254d4bc4f817626259.tar.xz | |
Change EXIF metadata handling into a registered function
This allows much greater flexibility from templates regarding
EXIF metadata handling, no more hardcoded symbols. It's possible
to display essentially any attribute known to Exiv2. Please see
http://exiv2.org/metadata.html
This brings two new functions that can be called from templates:
* get_exif_value (exiv2_attribute)
* get_exif_value_fixed (exiv2_attribute)
Both functions take a string argument of metadata attribute name
from Exiv2 namespace. The difference is that get_exif_value_fixed()
does some extra formatting for several basic attributes
(e.g. datetime format).
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/template_picture.html | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/templates/template_picture.html b/templates/template_picture.html index 973ef2b..07c79ec 100644 --- a/templates/template_picture.html +++ b/templates/template_picture.html @@ -20,7 +20,7 @@ <span class="navposspacer"></span> <a href="$(LINK_PREV)">< Previous</a> :: <a href="$(LINK_NEXT)">Next ></a> </div> - <div class="navexif">ISO <!-- $(EXIF_ISO) --> :: <!-- $(EXIF_TIME) --> :: <!-- $(EXIF_APERTURE) --> :: <!-- $(EXIF_FOCAL_LENGTH) --></div> + <div class="navexif">ISO <!-- $(get_exif_value_fixed("Exif.Photo.ISOSpeedRatings")) --> :: <!-- $(get_exif_value_fixed("Exif.Photo.ExposureTime")) --> :: <!-- $(get_exif_value_fixed("Exif.Photo.FNumber")) --> :: <!-- $(get_exif_value_fixed("Exif.Photo.FocalLength")) --></div> </div> @@ -47,13 +47,13 @@ <div id="exif_table" style="display: none;"> :: <a href="javascript: set_exif_table_visibility('no'); write_exif_table_cookie('no');">Hide EXIF</a> <table><tbody> - <tr><td>Date: </td> <td><!-- $(EXIF_DATE) --></td></tr> - <tr><td>Camera: </td> <td><!-- $(EXIF_CAMERA_MODEL) --></td></tr> - <tr><td>ISO: </td> <td><!-- $(EXIF_ISO) --></td></tr> - <tr><td>Focal length: </td> <td><!-- $(EXIF_FOCAL_LENGTH) --></td></tr> - <tr><td>Aperture value: </td> <td><!-- $(EXIF_APERTURE) --></td></tr> - <tr><td>Exposure time: </td> <td><!-- $(EXIF_TIME) --></td></tr> - <tr><td>Flash: </td> <td><!-- $(EXIF_FLASH) --></td></tr> + <tr><td>Date: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.DateTimeOriginal")) --></td></tr> + <tr><td>Camera: </td> <td><!-- $(get_exif_value_fixed("Exif.Image.Model")) --></td></tr> + <tr><td>ISO: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.ISOSpeedRatings")) --></td></tr> + <tr><td>Focal length: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.FocalLength")) --></td></tr> + <tr><td>Aperture value: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.FNumber")) --></td></tr> + <tr><td>Exposure time: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.ExposureTime")) --></td></tr> + <tr><td>Flash: </td> <td><!-- $(get_exif_value_fixed("Exif.Photo.Flash")) --></td></tr> </tbody></table> </div> <div id="exif_line" style="display: block;"> |
