BUG?:Binary support for JSON output with TAG PhotoshopThumbnail

Started by swez, May 10, 2018, 04:50:44 AM

Previous topic - Next topic

swez

hi,
i can not extract binary for PhotoshopThumbnail with use export to JSON and binary extract

System: Mac OS X 10.13.3
  ExifTool install from brew (i modified brew to actual version manualy)
ExifTool version: 10.8 and 10.96  same behavior
Sample image: http://radekerben.com/sample.jpg (after save this post with this image only return message: "Your attachment has failed security checks and cannot be uploaded.")

specific command line example with output:

$ exiftool -ver
10.96
$ exiftool -a -j -b -n sample.JPG |grep  PhotoshopThumbnail
$ exiftool -a -j -n sample.JPG |grep  PhotoshopThumbnail
  "PhotoshopThumbnail": "(Binary data 3880 bytes, use -b option to extract)",
$ exiftool -b -W %d%f_%t%-c.%s -preview:all sample.JPG
  2 output files created
$ ls sample_*
sample_PhotoshopThumbnail.jpg  sample_ThumbnailImage.jpg

Thank you for your help

Phil Harvey

Thanks for pointing this out.  I will add this to the documentation:

       -b (-binary)
            Output requested metadata in binary format without tag names or
            descriptions.  This option is mainly used for extracting embedded
            images or other binary data, but it may also be useful for some
            text strings since control characters (such as newlines) are not
            replaced by '.' as they are in the default output.  By default,
            list items are separated by a newline when extracted with the -b
            option, but this may be changed (see the -sep option for details).
            May be combined with "-j", "-php" or "-X" to extract binary data
            in JSON, PHP or XML format, but note that "unsafe" tags must be
            specified explicitly to be extracted as binary in these formats
.


I can't remember now why it was done this way, and it does seem a bit confusing, but I'm sure there was a good reason.

- 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 ($).

swez

Thank you, but in output whatever you write to output of not listed or not extracted in binary mode?

Phil Harvey

...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 ($).

swez

ou sorry my english is bad :-) and i try again and better formulation.

exiftool with -b option, tag PhotoshopThumbnail misses and i suggest this tag write to output and for exmaple this information message

"PhotoshopThumbnail": "(Binary data not extracted, with option "-j", "-php" or "-X" combined with "-b" option. Please tag must be specified explicitly to be extracted as binary in these formats. )"

Better?
Thank you for your support

Phil Harvey

Ah, I understand now.  I'll think about your suggestion, thanks.

- 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 ($).