Hello,
does anybody know if there is a way to recognize an arbitrary path
in JPEG file which is saved from Photoshop?
I try this:
exiftool -a -s some-clipping-path.jpg | grep Path
ClippingPathName : some-path
which is fine. But if the path is not a special clipping path:
exiftool -a -s some-path.jpg | grep Path
I lose the information that a path really exists.
As a workaround I use the "identify" command from ImageMagick:
identify -verbose some-path.jpg | grep path
Image: some-path.jpg
Clipping path:
<path style="fill:#00000000;stroke:#00000000;stroke-width:0;stroke-antialiasing:false" d="
I'd like to know if this could be done with exiftool.
Many thanks,
Axel.
http://dl.dropbox.com/u/84530/IM/some-path.jpg
http://dl.dropbox.com/u/84530/IM/some-clipping-path.jpg
Hi Axel,
Do you want to know the name of the path, the path data, or just that a path exists?
Currently, exiftool only extracts the raw (undecoded) path information with the -u or -v options, but the path name is only extracted with the -v option.
The path information is stored in the Photoshop_0x07d0 through Photoshop_0x0bb6 tags.
- Phil
Hi Phil,
(I'm impressed!)
currently I'd be totally happy to know that any path exists.
I feed such images to ImageMagick with the "-clip" option which does the right thing™.
I admit that it would be even better to have the path name for even more intelligent
processing though
Thanks a lot
Axel.
Hi Axel,
I looked into this a bit more and found this old thread (https://exiftool.org/forum/index.php/topic,1621.0.html). The path names may be extracted along with the raw path data by adding the SetResourceName flag to a user-defined tag. Here is a config file that does this. (http://owl.phy.queensu.ca/~phil/stuff/alex_exiftoolconfig.txt) Delete the "Binary" flag from this config file and you will see the path name at the end of the raw path data, enclosed in /#...#/.
With this config file, you can use the following command to see all paths:
exiftool -PhotoshopPaths some-path.jpg
- Phil
Wonderful, very much appreciated.
Yours truly, Axel.
Hello,
is there any way to get just the PhotoshopPathNames?
Perhaps a config hacks or something else?
I need just the names to check if an special path exists.
It feels wrong to process the binary output to extract the /# ... #/ names.
Kind regards
Juergen
Hi Juergen,
I have prepared a config file for you (http://owl.phy.queensu.ca/~phil/stuff/jjg_exiftoolconfig.txt) that returns the names of each path, not including the binary data. See the config file documention (https://exiftool.org/config.html) if you have any questions about activating this. Here is how it works:
> exiftool -PhotoshopPaths some-path.jpg
Path 7d 0 : some-path
- Phil
Thanks!
That's exact what i need!
You are the hero of the day ;)
Thanks a lot
Juergen
Sample config to prevent 1000 lines of code.
%Image::ExifTool::Shortcuts::UserDefined = (
PhotoshopPaths => [
map {
sprintf "Path%x", $_
} (0x7d0 .. 0xbb5)
]
);
%Image::ExifTool::UserDefined = (
'Image::ExifTool::Photoshop::Main' => {
map {
$_ => {
Name => sprintf("Path%x", $_),
Flags => [ qw( Writable
Protected
SetResourceName) ],
ValueConv => '$val =~ m{/#(.*?)#/$}s ? $1 : "<none>"'
}
} (0x7d0 .. 0xbb5)
}
);
Smart!
Hi
I post here because this subject is connected with my problem.
I want to copy Photoshop paths from one file to another (destination) - at the end I would like to open destination file and see working paths.
I see option -u is helpful, because earlier extracted just a few metadata.
So I listed the paths but have problem with writing/copying to destination file.
I use:
c:\exiftool.exe -u -tagsFromFile 03.jpg -Photoshop:all 04.jpg
Is it locked to write Photoshop metadata or should I use intermediate file (.xmp) and import metadata?
help
source file:
http://skorzec.idl.pl/exiftool/with_path.jpg (http://skorzec.idl.pl/exiftool/with_path.jpg)
destination, without paths yet:
http://skorzec.idl.pl/exiftool/destination.jpg (http://skorzec.idl.pl/exiftool/destination.jpg)
For -photoshop:all to copy the path information, you would have to remove the "Protected" flag and the "ValueConv" conversion from the user-defined path tags. With these removed, you should be able to copy the path information, but there may be other supporting information that needs to be copied for these to be usable. So good luck with this. ;)
- Phil
hey,
I really like to work with exiftool. But now I have a question, that I could not answer by searching through this forum.
Is it possible to activate or deactivate the clipping path by using exiftool?
For example:
The file "ballons.jpg" has two paths ("crop" and "ballons"). I can set in Photoshop the clipping path to "crop", "ballon" or "none".
Setting the clipping path with exiftool would simplify my workflow.
I tried this:
exiftool -Photoshop:ClippingPathName="crop" ballon.jpg
- - - -
Warning: Sorry, Photoshop:ClippingPathName doesn't exist or isn't writable
Nothing to do.
Furthermore I am interested to do that action with tiff and psd files.
Thanks!
Marvin
Interesting idea, but ExifTool doesn't currently write ClippingPathName. Adding write support for this may be problematic because there are 6 bytes after the name in this record that contain some unknown information.
- Phil
Thank you Phil for the quick feedback.
I had hoped, that the clipping path is a simple string value without any problems. So, you are right, that writable this metadata isn't a good idea.
Marvin