ExifMetaDataPlugin
Display EXIF (Exchangeable Image File) data for JPEG images attached to a topic
Introduction
Most current digital camera store images using EXIF (Exchangeable Image File) compressed files. EXIF is a standard defined by the Japan Electronic Industry Development Association and supports the storage of extended camera information within the header of a JPEG file.
ExifMetaDataPlugin is a TWiki plugin that make use of the EXIF standard. It displays EXIF data for images attached to a topic.
Syntax Rules
The
%EXIFMETADATA{...}% variable gets expanded to the EXIF data extracted from the image specified by the
file parameter.
| Parameters |
Comment |
Example |
"..." or file="..." |
File name of the EXIF file to process. |
"picture.jpg" |
topic="..." |
Topic where the EXIF file is attached to; format "TopicName" or "Web.TopicName". Default is the current topic. |
topic="Sandbox.TestExif" |
tags="..." |
User specified list of EXIF tags to show. Default is "33434,33437,34855,36867,37386". See below for a list of supported tags. You may specify all to read all supported EXIF tags from the file. |
tags="271,305" |
Supported EXIF Tags
| Number |
Description |
270 |
Describes image |
271 |
Shows manufacturer of digital camera |
272 |
Shows model number of digital camera |
305 |
Shows firmware version number. |
306 |
Date/Time of image was last modified. Data format is "YYYY:MM:DD HH:MM:SS". In usual, it has the same value of 36867 |
33434 |
Exposure time (reciprocal of shutter speed if shorter than one second). |
33437 |
F-stop of lens when the image was taken. |
34855 |
ISO speed (CCD sensitivity equivalent to film speed-rate). |
36867 |
Date/Time of original image taken. This value should not be modified by user program. |
36868 |
Date/Time of image digitized. Usually, it contains the same value of 36867. |
37386 |
Focal length of lens used to take image. |
37510 |
User comment (ASCII only). |
Error Codes
If the EXIF data can not be obtained for some reason, the
%EXIFMETADATA{...}% variable gets expanded to an error code.
| Code |
Description |
EXIF-ERROR-01 |
No file attribute specified. |
EXIF-ERROR-02 |
Can't open file. |
EXIF-ERROR-03 |
No exif data. |
EXIF-ERROR-04 |
APP1 does not contain EXIF data. |
EXIF-ERROR-05 |
Invalid byte alignment. |
EXIF-ERROR-06 |
Invalid tag mark. |
EXIF-ERROR-07 |
Error reading block length. |
Examples
Write
%EXIFMETADATA{ "picture.jpg" tags="271,272" }% to get the manufacturer and model name of tha camera used to take the image in the file
picture.jpg.
| Variable |
Expected Output |
If Installed |
%EXIFMETADATA{ "picture.jpg" }% |
1/125 sec, f2.6, ISO100, 2004:01:17 22:17:13, 8mm |
%EXIFMETADATA{ "picture.jpg" }% |
%EXIFMETADATA{ "picture.jpg" tags="271,305" }% |
NIKON, E4500v1.2 |
%EXIFMETADATA{ "picture.jpg" tags="271,305" }% |
Plugin Settings
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Display EXIF (Exchangeable Image File) data for JPEG images attached to a topic
- Debug plugin: (See output in
data/debug.txt)
Plugin Installation Instructions
Note: You do not need to install anything on the browser to use this plugin. The following instructions are for the administrator who installs the plugin on the TWiki server.
- For an automated installation, run the configure script and follow "Find More Extensions" in the in the Extensions section.
- Or, follow these manual installation steps:
- Download the ZIP file from the Plugins home (see below).
- Unzip
ExifMetaDataPlugin.zip in your twiki installation directory. Content: | File: | Description: |
data/TWiki/ExifMetaDataPlugin.txt | Plugin topic |
pub/TWiki/ExifMetaDataPlugin/picture.jpg | Sample JPEG file |
lib/TWiki/Plugins/ExifMetaDataPlugin.pm | Plugin Perl module |
- Set the ownership of the extracted directories and files to the webserver user.
- Plugin configuration and testing:
- Run the configure script, and enable the plugin in the Plugins section.
- Test if the installation was successful: See above example if you get the proper result in the "If Installed" column.
Plugin Info
Related Topics: TWikiPreferences,
TWikiPlugins