jpgfromraw not detected when piping file from stdin

Started by bbrown@extensis.com, October 18, 2013, 08:17:37 PM

Previous topic - Next topic

bbrown@extensis.com

When I use exiftool -composite:jpegfromraw <path to sample file>

exiftool detects the presence of the embedded jpeg.

However, if I use exiftool -composite:jpgfromraw -

exiftool doesn't find it. Is this a bug, or is there additional information that exiftool needs when it doesn't have an actual location on disk?

(I'm using piping on Windows in order to handle non-ascii paths.)

Thanks! And thanks for supporting this excellent tool.

P.S. I tried to attach a sample. It was 7 megs, so per the restrictions, it should have been okay, but the upload failed. Sorry. I'll see if I can provide it via dropbox.

bbrown@extensis.com


bbrown@extensis.com

The sample file is at https://www.dropbox.com/s/ktaoal2cxx5lf4x/test.nef

Phil Harvey

I can't download your test image on my slow internet connection right now.  If I knew the model type I would have a sample on hand.  I tried this for a D5000 NEF and didn't see the problem.  However, I can imagine how this might happen.  The specific flavour of TIFF image affects the processing.  In this case, ExifTool might not know this is an NEF image until it is too late to extract the JpgFromRaw.  When reading from file, ExifTool uses the file extension as an early indication of the file type.  When reading from a pipe, ExifTool uses the Compression tag to determine the file type.  If the Compression tag comes after the JpgFromRawStart/Length tags, then they may not be properly identified.

Try comparing the verbose outputs to see exactly what is happening:

exiftool test.nef -v > t1
cat test.net | exiftool -v > t2
diff t1 t2


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