ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: swez on May 10, 2018, 04:50:44 AM

Title: BUG?:Binary support for JSON output with TAG PhotoshopThumbnail
Post by: swez on May 10, 2018, 04:50:44 AM
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
Title: Re: BUG?:Binary support for JSON output with TAG PhotoshopThumbnail
Post by: Phil Harvey on May 10, 2018, 08:10:50 AM
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
Title: Re: BUG?:Binary support for JSON output with TAG PhotoshopThumbnail
Post by: swez on May 30, 2018, 11:45:17 AM
Thank you, but in output whatever you write to output of not listed or not extracted in binary mode?
Title: Re: BUG?:Binary support for JSON output with TAG PhotoshopThumbnail
Post by: Phil Harvey on May 30, 2018, 12:46:46 PM
I'm sorry, but I don't understand the question

- Phil
Title: Re: BUG?:Binary support for JSON output with TAG PhotoshopThumbnail
Post by: swez on May 30, 2018, 12:56:25 PM
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
Title: Re: BUG?:Binary support for JSON output with TAG PhotoshopThumbnail
Post by: Phil Harvey on May 30, 2018, 08:38:15 PM
Ah, I understand now.  I'll think about your suggestion, thanks.

- Phil