#------------------------------------------------------------------------------
# File: photoshop_paths.config
#
# Description: This config file generates user-defined tags for Photoshop
# paths, and may be used to extract path names or copy path
# information from one file to another.
#
# An "AllPaths" shortcut tag is also provided represent all
# Photoshop path tags. This shortcut must be used when copying
# because these tags are marked as "Protected" so they won't be
# copied by default.
#
# Note: Print conversion must be disabled to be able to copy these tags
# (via either the -n option, or by adding a "#" to the tag name,
# eg. "-tagsfromfile SRC -allpaths#").
#
# Usage:
#
# 1) Extract Photoshop path names:
#
# exiftool -config photoshop_paths.config -allpaths FILE
#
# 2) Copy all Photoshop paths from one file (SRC) to another (DST):
#
# exiftool -config photoshop_paths.config -tagsfromfile SRC -allpaths# DST
#
# Requires: ExifTool version 9.95 or later
#
# Revisions: 2015/05/07 - P. Harvey Created
#
# References: http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,1621.0.html
# http://u88.n24.queensu.ca/exiftool/forum/index.php/topic,3910.0.html
#------------------------------------------------------------------------------
%Image::ExifTool::Shortcuts::UserDefined = (
# create "AllPaths" shortcut for all Photoshop path tags
AllPaths => [
map { sprintf "Path%x", $_ } (0x7d0 .. 0xbb5),
],
);
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Photoshop::Main' => {
# generate tags for each of the 998 possible Photoshop paths
map { $_ => {
Name => sprintf('Path%x', $_),
Description => sprintf('Path %x', $_),
Flags => [ qw(Writable Protected Binary ConvertBinary SetResourceName) ],
PrintConv => '$$val =~ m{/#(.*?)#/$}s ? $1 : "<none>"',
} } (0x7d0 .. 0xbb5),
},
);
1; #end