ExifTool Forum

ExifTool => Newbies => Topic started by: elliotnewmam on October 16, 2014, 06:00:12 PM

Title: Recursively copy IFDO dng to tiff
Post by: elliotnewmam on October 16, 2014, 06:00:12 PM
I am trying to copy dng specific tags, which I've got working, but now trying to get it working recursively... Here is what I have so far, but it's not working yet:...

exiftool -tagsfromfile %d%f.dng "'-ExifIFD:ColorMatrix1<IFD0:ColorMatrix1' '-ExifIFD:ColorMatrix2<IFD0:ColorMatrix2' '-ExifIFD:AnalogBalance<IFD0:AnalogBalance' '-ExifIFD:CameraCalibration1<IFD0:CameraCalibration1' '-ExifIFD:CameraCalibration2<IFD0:CameraCalibration2' '-ExifIFD:AsShotNeutral<IFD0:AsShotNeutral' '-ExifIFD:CalibrationIlluminant1<IFD0:CalibrationIlluminant1' '-ExifIFD:CalibrationIlluminant2<IFD0:CalibrationIlluminant2' '-ExifIFD:ForwardMatrix1<IFD0:ForwardMatrix1' '-ExifIFD:ForwardMatrix2<IFD0:ForwardMatrix2'" -r -ext tiff .

The directory I am running this in contains .dng and .tiff files, both share filename.

exiftool outputs:

    1 directories scanned
    4 image files updated


It also seems to take a while to run, I guess that's because I should be running the command with the overwrite original so not to write extra tiff data to disk?
Title: Re: Recursively copy IFDO dng to tiff
Post by: Phil Harvey on October 16, 2014, 07:13:55 PM
So what is going wrong?  It looks like there were only 4 "tiff" files in the directory.

Adding -overwrite_original does not speed things up at all.  How big are these tiff files?

- Phil
Title: Re: Recursively copy IFDO dng to tiff
Post by: elliotnewmam on October 17, 2014, 03:05:19 AM
93mb tiff files. I guess this type of tag modification requires the image data to be re-written?

Sorry I should have been more descriptive, exiftool reports that 4 files have been updated, and comparing them to the original tiffs they are bigger, but the crucial IFDO exif data is missing - Color Matrix, Camera Calibration etc.

I do know this command works:

exiftool -tagsfromfile filename.dng '-ExifIFD:ColorMatrix1<IFD0:ColorMatrix1' '-ExifIFD:ColorMatrix2<IFD0:ColorMatrix2' '-ExifIFD:AnalogBalance<IFD0:AnalogBalance' '-ExifIFD:CameraCalibration1<IFD0:CameraCalibration1' '-ExifIFD:CameraCalibration2<IFD0:CameraCalibration2' '-ExifIFD:AsShotNeutral<IFD0:AsShotNeutral' '-ExifIFD:CalibrationIlluminant1<IFD0:CalibrationIlluminant1' '-ExifIFD:CalibrationIlluminant2<IFD0:CalibrationIlluminant2' '-ExifIFD:ForwardMatrix1<IFD0:ForwardMatrix1' '-ExifIFD:ForwardMatrix2<IFD0:ForwardMatrix2' filename.tiff

I am now trying to modify it to work through all dngs and tiffs in the directory.
Title: Re: Recursively copy IFDO dng to tiff
Post by: Phil Harvey on October 17, 2014, 07:05:20 AM
ExifTool always re-writes the file.  This isn't strictly necessary, but it is the technique that ExifTool uses.

If the ColorMatrix is missing, then you should confirm that the information exists in the source file.  If it does, then try copying it separately, perhaps with the -v2 option, to see what warnings ExifTool gives.

- Phil
Title: Re: Recursively copy IFDO dng to tiff
Post by: elliotnewmam on October 20, 2014, 05:16:41 PM
Ok, so found out the issue - it was due to the double quotation marks. The following now works fine:

exiftool -tagsfromfile %d%f.dng '-ExifIFD:ColorMatrix1<IFD0:ColorMatrix1' '-ExifIFD:ColorMatrix2<IFD0:ColorMatrix2' '-ExifIFD:AnalogBalance<IFD0:AnalogBalance' '-ExifIFD:CameraCalibration1<IFD0:CameraCalibration1' '-ExifIFD:CameraCalibration2<IFD0:CameraCalibration2' '-ExifIFD:AsShotNeutral<IFD0:AsShotNeutral' '-ExifIFD:CalibrationIlluminant1<IFD0:CalibrationIlluminant1' '-ExifIFD:CalibrationIlluminant2<IFD0:CalibrationIlluminant2' '-ExifIFD:ForwardMatrix1<IFD0:ForwardMatrix1' '-ExifIFD:ForwardMatrix2<IFD0:ForwardMatrix2' -r -ext tiff .
Title: Re: Recursively copy IFDO dng to tiff
Post by: Phil Harvey on October 20, 2014, 07:04:16 PM
Ah.  I didn't notice those in your first command.

- Phil