This is an old revision of the document!


Metadata

Introduction

Metadata are data contained directly in files. Even if you loose your database, those data will survive :-) Examples of metadata : filesize, width & height (for a picture), EXIF metadata, IPTC metadata, ID3 tags (mp3 file format).

Showing metadata

On the presentation page of an element (a picture, most of times) PhpWebGallery proposes 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 informations can't be used for search. 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 of the same date of creation. The solution for this is using 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, PhpWebGallery 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 PhpWebGallery database. Once copied in 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.1315921015.txt.gz · Last modified: 2011/09/13 13:36 by plg
 
 
github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact