Metadata Read/Write Mapping
ResourceSpace is able to map between embedded metadata stored in your files, and the external metadata fields in ResourceSpace itself. This synchronisation can be two way, so that imported metadata that has been updated in ResourceSpace is written back to the file at download.
Mapping metadata when using the ExifTool utility
ResourceSpace makes use of the open source ExifTool utility to read and write metadata. This is extremely flexible and any metadata present in a file can be mapped to ResourceSpace fields. Many different profiles are supported in addition to Exif, including XMP, IPTC, GPS, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP and ID3.
You must have ExifTool (a command-line interface to a PERL library) installed and enabled (the path must be specified) in config.php or auto-detected during the setup routine.
In order to map an IPTC/Exif/XMP tag name to a ResourceSpace field, you can enter ExifTool-supported tag name(s) in the "Exiftool_Field" box in the metadata field settings.
Here are some example mappings. Your default installation will probably have these and more already set up.
|RS Field||Exiftool_field Tags|
See ExifTool documentation to look up tag names. It fully supports read/writing of several filetypes including JPG, GIF, PNG, TIF, EPS, PDF. It can also read data from other filetypes that are not write-supported.
http://www.sno.phy.queensu.ca/~phil/exiftool/exiftool_pod.html <--good documentation of command-line capabilities
Do "exiftool -listw" on the command line for a list of writable fields. Any of those names could be used in the exiftool_field in RS to develop your ideal read/write mapping.
Do "exiftool -s [filename]" to get a report of existing metadata in an image. For example, if you have files with metadata in them and would like to upload them to RS and index that information, you should be able to work out some appropriate mappings from the metadata report.
Remember that any individual field may not be available for a particular filetype. For example JobID will not write to a PDF file. If you need "Notes" to be written to PDF files, you will have to find a PDF-writable field in addition to JobID. The reason for using multiple fields is that certain programs look for information in a specific place. For example if Photoshop gets the caption from Caption-Abstract and another program you use gets it from ImageDescription, you need to have your RS caption in both. It may take some experimentation to get the combination that best suits your workflow.
Of course you can also create your own custom fields and mappings. Let's say you want a weblink to be embedded in the metadata of your images. You simply create an RS field called something like "URL" and in the Exiftool_field you write "WebStatement", which is a field you've found in ExifTool's list of writeable fields that is most appropriate for that kind of data.
Read-only metadata fields
ResourceSpace can have certain metadata fields set as read-only. This will determine whether the field should be written back to the files on download.
This is done from Admin > System > Manage metadata fields area. A Super Admin user will choose this for all the fields that should be read-only by selecting the option Read-only metadata field (ie. will not write back on Download).
Please note that this option will only affect embedded metadata. If any metadata field has the option 'Include in CSV export' unchecked then data from this field will not be included in the accompanying CSV file upon collection download, irrespective of user access or exif read/write settings.
Example configuration and expected behaviour
$exiftool_write = true; $force_exiftool_write_metadata = true; $exiftool_write_option = true; $exiftool_remove_existing = true;
and having metadata fields "Credit" and "Camera/Model" read-only, after downloading a resource the Credit and Camera/Model should not be set. Please note the above configuration is using the remove existing option. If this is set to false, you should see Credit or Camera/Model but with the original value - not the one from ResourceSpace.
Mapping Exif / IPTC without Exiftool
If you have not installed Exiftool, ResourceSpace supports the reading of some basic EXIF fields and all IPTC fields when resources are uploading. For anything other than the most basic metadata support it is best to use ExifTool as described above.
Without ExifTool, ResourceSpace will not write altered metadata back to files on download.
Exif fields are mapped using the $exif_* settings in include/config.php.
IPTC fields are mapped using the 'IPTC Equiv.' option on each field in System Setup. The codes you need are as follows:
|IPTC Equiv. value||Metadata field extracted|
|2#085||Credit Byline Title|