ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: simon.h on October 08, 2018, 09:52:35 AM

Title: Photoshop paths seem to be broken for some TIFs when using command tagsFromFile
Post by: simon.h on October 08, 2018, 09:52:35 AM
Hi, I'm facing an issue regarding the copy command tagsFromFile and metadata for Photoshop paths. In the attachments there is a zip archive containing work files for our use case that can be used to reproduce the issue. The use case is described as follows:

We have a jpg file ("input/paths.jpg") containing metadata for Photoshop paths. We then copy the corresponding Photoshop path tags to a tif file ("input/src.tif") which was exported with Adobe Lightroom Classic CC before. The following command is used therefor:

exiftool -config ExifTool_config -tagsFromFile "input/paths.jpg" -Photoshop:Path7d0#>Photoshop:Path7D0# -Photoshop:Path7d1#>Photoshop:Path7D1# -Photoshop:Path7d2#>Photoshop:Path7D2# "input/src.tif"

When I open the resulting output file ("output/output.tif") in Photoshop CC 2018 the paths seem to be okay. But when I try to read the path information with the following ImageMagick test command an error occurs:

convert "output/output.tif" -clip-path "Path 1" "output/converted.tif"

Error message:

Code: [Select]
convert: no clip path defined `output/output.tif': No such file or directory @ error/image.c/ClipImagePath/724.
This however only happens when I try to read the first path "Path 1". When I specify "Path 2" or "Path 3" no error occurs. A workaround we found so far is to re-save the source tif file with Photoshop ("input/src_resaved_with_photoshop.tif"). If the Photoshop path tags are copied to that file ("output/output_resaved_with_photoshop.tif") ImageMagick won't complain later on. So there are some differences in the source tif files causing the copied Photoshop path tags to be broken (at least for ImageMagick). When I compare the tags of the two output files ("output/output_tags.txt" and "output/output_resaved_with_photoshop_tags.txt") I can't see any relevant differences. The "Photoshop:PathXXX" tags are identical. What could be the problem here?

Tested software
macOS Sierra 10.12.6
Exiftool 11.12
ImageMagick 6.8.6-10 / 6.9.9-40 / 7.0.8-12
Adobe Photoshop CC 2018
Adobe Lightroom Classic CC
Title: Re: Photoshop paths seem to be broken for some TIFs when using command tagsFromFile
Post by: Phil Harvey on October 08, 2018, 08:30:52 PM
What config file are you using?  There is a config file in the full distribution specifically designed for copying Photoshop paths (config_files/photoshop_paths.config).  Read the notes at the start of this file for an example command to copy the paths.

- Phil
Title: Re: Photoshop paths seem to be broken for some TIFs when using command tagsFromFile
Post by: simon.h on October 09, 2018, 03:36:35 AM
The config file we use is contained inside the zip archive that I attached to my initial comment ("ExifTool_config"). I will test again with the config file that you mentioned and compare it to ours. Thanks for the advice!
Title: Re: Photoshop paths seem to be broken for some TIFs when using command tagsFromFile
Post by: simon.h on October 09, 2018, 05:09:54 AM
I tested the following command from the copy example of the config file "config_files/photoshop_paths.config":

exiftool -config photoshop_paths.config -tagsfromfile "input/paths.jpg" -allpaths# -originpathinfo "input/src.tif"

Unfortunately the resulting output is causing the same problem that I described before. If all the Photoshop paths are copied to "input/src.tif" ImageMagick will raise an error for "Path 1". If copied to "input/src_resaved_with_photoshop.tif" no error occurs in ImageMagick. Is there a way to validate the copied Photoshop path tags for the output files? If the tags are valid maybe there is a problem with ImageMagick.
Title: Re: Photoshop paths seem to be broken for some TIFs when using command tagsFromFile
Post by: Phil Harvey on October 09, 2018, 07:06:23 AM
I don't have any way to validate the paths.  Does the same problem occur if you copy the paths from the Photoshop-resaved file back to the JPG?  If not, then take a look at the paths to see what Photoshop changed by comparing the output of this command with the original:

exiftool -config photoshop_paths.config -userparam anchor -allpaths FILE

- Phil
Title: Re: Photoshop paths seem to be broken for some TIFs when using command tagsFromFile
Post by: simon.h on October 09, 2018, 11:42:56 AM
There is no problem wehen I copy the paths back from the Photoshop-resaved file to the jpg file. I was able to read all paths from the resulting jpg with ImageMagick. I then executed your command for both tif output files ("output/output.tif" and "output/output_resaved_with_photoshop.tif") but the output for the path anchors was identical. So there seem to be other differences causing troubles. I will also open a thread in the ImageMagick forum and ask why ImageMagick complains about the paths. The developers should be able to debug whats the cause of the error.

Thanks for your help so far!
Title: Re: Photoshop paths seem to be broken for some TIFs when using command tagsFromFile
Post by: Phil Harvey on October 09, 2018, 12:03:33 PM
It would be interesting to hear what they say.  Maybe you could post a link here to your ImageMagic post.

- Phil
Title: Re: Photoshop paths seem to be broken for some TIFs when using command tagsFromFile
Post by: simon.h on October 10, 2018, 06:52:32 AM
Here is the link to the corresponding ImageMagick post:

https://imagemagick.org/discourse-server/viewtopic.php?f=3&t=34844