You are here: FS > TWiki Web > ExifMetaDataPlugin r5 - 02 Jul 2004 - 22:13 - PascalBuchbinder?


Start of topic | Skip to actions

ExifMetaDataPlugin

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
file File name of the EXIF file to process. The file must be attched to the topic. file="picture.jpg"
tags User specifed 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 digicam
272 Shows model number of digicam
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 speedrate).
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.

Codeup Description
EXIF-ERROR-07 Error reading block length.
EXIF-ERROR-06 Invalid tag mark.
EXIF-ERROR-05 Invalid byte alignment.
EXIF-ERROR-04 APP1 does not contain EXIF data.
EXIF-ERROR-03 No exif data.
EXIF-ERROR-02 Can't open file.
EXIF-ERROR-01 No file attribute specified.

Examples

Write %EXIFMETADATA{ file="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 Output
%EXIFMETADATA{ file="picture.jpg" }% EXIF-ERROR-02
%EXIFMETADATA{ file="picture.jpg" tags="271,305" }% EXIF-ERROR-02

Plugin Settings

  • One line description, is shown in the TextFormattingRules topic:
    • Set SHORTDESCRIPTION = Displays EXIF data for jpeg images attached to a topic.

  • Debug plugin: (See output in data/debug.txt)
    • Set DEBUG = 0

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 server where TWiki is running.

  • Download the ZIP file from the Plugin web (see below)
  • Unzip ExifMetaDataPlugin.zip in your twiki installation directory. Content:
    File: Description:
    data/TWiki/ExifMetaDataPlugin.txt Plugin topic
    data/TWiki/ExifMetaDataPlugin.txt,v Plugin topic repository
    pub/TWiki/ExifMetaDataPlugin/picture.jpg Sample jpeg file
    lib/TWiki/Plugins/ExifMetaDataPlugin.pm Plugin Perl module
  • Test if the installation was successful: Write %EXIFMETADATA% anywhere in a topic. The variable gets expanded to the error message EXIF-ERROR-01.

Plugin Info

Plugin Author: TWiki:Main/PascalBuchbinder
Plugin Version: 02 Jul 2004 (V1.010)
Change History:  
02 Jul 2004: bug fix, don't process unknown IFD entries
30 Jan 2004: support for 37510
29 Jan 2004: round f-stop (33437)
19 Jan 2004: round focal lenght (37386) and enable debug messages
18 Jan 2004: Initial version
CPAN Dependencies: none
Other Dependencies: none
Perl Version: 5.005
TWiki:Plugins/Benchmark: GoodStyle nn%, FormattedSearch nn%, ExifMetaDataPlugin nn%
Plugin Home: http://TWiki.org/cgi-bin/view/Plugins/ExifMetaDataPlugin
Feedback: http://TWiki.org/cgi-bin/view/Plugins/ExifMetaDataPluginDev

Related Topics: TWikiPreferences, TWikiPlugins

-- TWiki:Main/PascalBuchbinder - 18 Jan 2004

toggleopenShow attachmentstogglecloseHide attachments
Topic attachments
I Attachment Action Size Date Who Comment
ExifMetaDataPlugin.zipzip ExifMetaDataPlugin.zip manage 24.2 K 02 Jul 2004 - 22:11 PascalBuchbinder? version 1.010
picture.jpgjpg picture.jpg manage 41.0 K 18 Jan 2004 - 22:00 PascalBuchbinder? sample jpeg file
Edit | Attach | Printable | Raw view | Backlinks: Web, All webs | History: r5 < r4 < r3 < r2 < r1 | More topic actions
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding FS? Send feedback