ExifTool Forum

ExifTool => Bug Reports / Feature Requests => Topic started by: jean on December 05, 2016, 06:17:11 AM

Title: different results using -p and -G1
Post by: jean on December 05, 2016, 06:17:11 AM
Hi Phil

when using:
exiftool -p $icc:all test.tif
i get 0

when using:
exiftool -G1 test.tif
i get a lot of ICC_header and ICC_Profile

jean
Title: Re: different results using -p and -G1
Post by: Phil Harvey on December 05, 2016, 07:44:26 AM
Hi Jean,

Try: exiftool -p $icc_profile:all test.tif

- Phil
Title: Re: different results using -p and -G1
Post by: jean on December 05, 2016, 09:08:33 AM
It works for icc_profile and icc-header thank you.
There is no way to get $icc in one shot ?
Title: Re: different results using -p and -G1
Post by: jean on December 05, 2016, 10:09:41 AM
one more small thing:
when using -p, -m does not work, warnings are detected then written
Title: Re: different results using -p and -G1
Post by: jean on December 05, 2016, 10:28:49 AM
and (last one, i promise  ;D)
i use exiftool using stay-open
after sending commands i must, sometimes, read twice the pipestdout to get {ready}

i understand that {ready} means the end of the process, is it correct ?

for example i write to the pipe:

-p
$iptc:all
-p
$icc_profile:all
test.tif
-execute

(+ fflush to validate the write process and Sleep(100) to wait for the end of the exiftool process)

The result is:
first ReadFile(pipestdout):
1
1
second ReadFile:
{ready}

BUT with another file i can get, directly in the first read:
1
1
{ready}

Is there a way to know that, after the first read, all the data have not been delivered ?

Title: Re: different results using -p and -G1
Post by: Phil Harvey on December 05, 2016, 10:46:33 AM
ICC_Profile:all will include the ICC-header tags (family 0 for these tags is ICC_Profile).

The -m option only stops warnings with "[minor]" in the description (even with -p).  If you want to stop all warnings, add -q -q.

Is that 100 microseconds you are sleeping?  If so, I can see why the "{ready}" sometimes comes after that.

- Phil
Title: Re: different results using -p and -G1
Post by: jean on December 05, 2016, 10:49:54 AM
In fact Sleep uses milliseconds
When scanning hundreds files it takes a long time to get the results with 0,1 second
Title: Re: different results using -p and -G1
Post by: Hayo Baan on December 05, 2016, 11:09:45 AM
why don't you simply combine them in one -p? E.g. -p '$icc_profile:all $iptc:all' should work (on windows, use double quotes). And if you then also include e.g. the filename, I think you can forgo the sleep as well (you then just need to process the output a bit different).
Title: Re: different results using -p and -G1
Post by: jean on December 05, 2016, 11:34:42 AM
I use stay-open and pipes to converse with exiftool, infact i do not need the quotes:
-p
$icc_profile:all $exif:all
test.tif
-execute

then i get the result and make the same process with other files.
if i do not wait between each file it produces an incredible mess of data  :)
Title: Re: different results using -p and -G1
Post by: Phil Harvey on December 06, 2016, 07:34:49 AM
Hi Jean,

You shouldn't have to sleep that long.  The maximum I would recommend is 0.01 sec, which would limit you to 100 files/sec (my C++ wrapper waits for 0.001 sec).  Just keep reading until you see the "{ready}\n" message.  And it would be faster if you didn't wait for the "{ready}\n" to send the next command.  I don't understand what you mean by a mess of data... you should be able to search for the "{ready}\n" messages to organize the output.

- Phil