Strange behaviour on Layer Unicode Names: some words are ignored

Started by Teo_, December 07, 2016, 04:22:12 AM

Previous topic - Next topic

Teo_

If I write some words in Photoshop layers like "Tail, Lateral line, etc." are shown in Layer Names but ignored in Layer Unicode Names. Is it a bug or I ignore something?
I've this behaviour on MacOS 10.12.1  with exiftool version 10.36.
Attached a sample file with this words in layers.

$ exiftool -layernames -layerunicodenames Layer-names-sample.psd
Layer Names                     : Text, Text 鈎? special char , Tail, Buccal cirri, Another text layer, Branchial septum, Lateral line, Trail, Long tail, Simple text
Layer Unicode Names             : , Text Èàéü special char , , , Another text layer, , , Trail, Long tail, Simple text

Phil Harvey

Quite right!  Thanks for pointing this out, and thanks for the sample.

There was a bug in the way that ExifTool was parsing the Layer structure that caused it to miss some names. 

This will be fixed in ExifTool 10.37.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hayo Baan

Interesting! The LayerNames tag is the simplified version with any "special" characters converted to a '?'. But note that you actually see garbage in place of Èàéü as Exiftool somehow incorrectly interprets the character bytes here. It interprets them as UTF-8, but they are in fact Mac (?) encoded (@Phil, I think you want to have a look at this).

Note: somehow exiftool is only capable of extracting the layer names in case of a psd file, I saved the file as a layered tiff and lost the layer names. Funnily enough, the names and even the content of the text layers were still present in the XMP, but not any "normal" layers. @Phil, the information must be present in the tiff though, so perhaps there is a way to retrieve it?
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Hi Hayo,

The special characters come out correct for me on OS X:

> exiftool -ver ../pics/Layer-names-sample.psd -layerunicodenames
10.36
Layer Unicode Names             : , Text Èàéü special char , , , Another text layer, , , Trail, Long tail, Simple text


In a TIFF image the layer information is stored in the ImageSourceData block which currently isn't being decoded by ExifTool.

- Phil

Edit:  Ah.  I see what you mean.  LayerNames comes out wrong.  yes.  The PSD documentation doesn't specify an encoding for this string, and ExifTool doesn't convert it.
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Hayo Baan

Quote from: Phil Harvey on December 07, 2016, 08:38:54 AM
The special characters come out correct for me on OS X:

Yes, for the Layer UnicodeLayerNames they do, but not for the LayerNames  ;)
Layer Names                     : Text, Text 鈎? special char , Tail, Buccal cirri, Another text layer, Branchial septum, Lateral line, Trail, Long tail, Simple text
If you look at the character codes you find them as e9 88 8e 9f, corresponding to the (MacRoman) characters Èàéü.

Quote from: Phil Harvey on December 07, 2016, 08:38:54 AM
In a TIFF image the layer information is stored in the ImageSourceData block which currently isn't being decoded by ExifTool.

Any plans to add decoding that to your (long) list of todos?

Cheers,
Hayo
Hayo Baan – Photography
Web: www.hayobaan.nl

Phil Harvey

Quote from: Hayo Baan on December 07, 2016, 08:56:43 AM
Yes, for the Layer UnicodeLayerNames they do, but not for the LayerNames  ;)

Yes.  I just realized this and was editing my post as you wrote this.

Quote
Any plans to add decoding that to your (long) list of todos?

In fact, I just added it to the list. :)

It is only fairly recently that I started decoding of Photoshop information like this because it was only fairly recently that the Photoshop PSD specification was made public (previously they made you sign a non-disclosure-type agreement if you wanted access to the spec).

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Teo_