This is an old revision of the document!


Metadata

Introduction

Metadata is information about information. In the case of image files this metadata is contained within the file itself. Even if you lose your database, this metadata will survive :-). Examples of metadata include: filesize, width & height (for a picture), EXIF metadata, IPTC metadata, ID3 tags (mp3 file format). Your digital camera writes metadata to the image when the picture is taken. Additional metadata can be written to the image file later. It is useful information.

Showing metadata

On the presentation page of an element (a picture, most of times) Piwigo allows you to show metadata: use the show file metadata button in the navigation bar. Depending on the configuration, filtered metadata will be shown.

This solution is the most simple. But you must be aware that metadata information can't be used for searching. If the creation date of a photograph is in the EXIF metadata set only (and not in the database), gallery visitors won't be able to find this photograph if they search elements with the same date of creation. The solution for this is to use metadata instead of only showing metadata.

Basic metadata

Basic metadata are filesize, width and height. They are shown by default in the element properties list. Historically, those data have never been considered as metadata but in reality, they are.

EXIF

You can configure the EXIF metadata to show in include/config.inc.php, here is an extract from release 1.4.0 :

// show_exif_fields : in EXIF fields, you can choose to display fields in
// sub-arrays, for example ['COMPUTED']['ApertureFNumber']. for this, add
// 'COMPUTED;ApertureFNumber' in $conf['show_exif_fields']
//
// The key displayed in picture.php will be $lang['exif_field_Make'] for
// example and if it exists. For compound fields, only take into account the
// last part : for key 'COMPUTED;ApertureFNumber', you need
// $lang['exif_field_ApertureFNumber']
//
// for PHP version newer than 4.1.2 :
// $conf['show_exif_fields'] = array('CameraMake','CameraModel','DateTime');
// 
$conf['show_exif_fields'] = array('Make',
                                  'Model',
                                  'DateTime',
                                  'COMPUTED;ApertureFNumber');

As you can see, Piwigo is very flexible. You can test a tools/sample.jpg file for viewing all included metadata thanks to script tools/metadata.php.

IPTC

FIXME

Using metadata

Among metadata, some can be copied into the Piwigo database. Once copied into the database, they can be considered as calculated data: they are stored in database only for speed purpose (during search, mainly).

In branch 1.3, very few metadata were supported : filesize, width and height. With branch 1.4, EXIF and IPTC support is considerablely increasing the number of managed metadata.

 
Back to top
user_documentation/metadata.1316181794.txt.gz · Last modified: 2011/09/16 14:03 by mixedbredie
 
 
github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact