Login  Register

getting string returned from exec() macro language exiftool command

Posted by Bill Christens-Barry on Nov 24, 2014; 9:04pm
URL: http://imagej.273.s1.nabble.com/getting-string-returned-from-exec-macro-language-exiftool-command-tp5010603.html

I've been trying to use Phil Harvey's excellent exiftool program to work with tiff metadata on a Windows 7 machine. After running the macro command:

    mdt1 = exec("cmd", "/c", "start", "C:\\Programs\\exiftool.exe", "-SpectralSensitivity=TEST", "C:\\Users\\User\\mages\\lena-std.tif");

use of exiftool by itself to inspect the "SpectralSensitivity" tag value shows that it has been set successfully.

However, if I try to inspect this tag's value using:

    mdt2 = exec("cmd", "/c", "start", "C:\\Programs\\exiftool.exe", "-SpectralSensitivity", "C:\\Users\\User\\Images\\lena-std.tif");
    print(mdt2);

The Log window opens, but with no content. Based on a thread in the list archives, I expected the Log window to display the string returned from exiftool.

How can I get the output from exiftool as a string that can be manipulated in an ImageJ macro program on Windows 7? Comparable use on MacOS, using sh, works fine.

Thanks,

Bill

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html