Subject: | metadata copying is broken |
Hi,
I noticed that metadata copying from one file to another is broken,
i.e. metadata are not copied faithfully.
In particular, the copy of the embedded preview image does not work
(this does not apply to the thumbnail, anyway). The following command
sequence shows what I mean; note that in the dscn4465-target.jpg file
the Preview hasn't been copied properly. I attach the three files for
your reference.
# A sample photo file with both Thumbnail and Preview
poletti@Polebian:~/sviluppo/perl/rotob$ exiftool -g dscn4465-mini.jpg
Show quoted text
---- ExifTool ----
ExifTool Version Number : 7.30
---- File ----
File Name : dscn4465-mini.jpg
Directory : .
File Size : 40 kB
File Modification Date/Time : 2008:06:08 04:15:25
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Little-endian (Intel, II)
Image Width : 488
Image Height : 380
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
---- JFIF ----
JFIF Version : 1.1
---- EXIF ----
Components Configuration : YCbCr
Flash : Auto, Fired
Interoperability Index : R98 - DCF basic file (sRGB)
Interoperability Version : 0100
Thumbnail Offset : 1992
Thumbnail Length : 2359
---- MakerNotes ----
Maker Note Version : 2.00
Color Mode : Color
Quality : Fine
White Balance : Auto
Focus Mode : AF-S
Flash Setting : Normal
ISO Selection : Auto
Preview Image Start : 4352
Preview Image Length : 6797
Image Processing :
Image Adjustment : Auto
Auxiliary Lens : Off
Manual Focus Distance : inf
Digital Zoom : 0
AF Area Mode : Single Area
AF Point : Center
AF Points In Focus : Center
Scene Mode :
Noise Reduction : Off
WB RBGG Levels : 0 0 0 0
Scene Assist :
Retouch History : None
Image Stabilization : VR-ON
---- XMP ----
Color Space : sRGB
Compressed Bits Per Pixel : 4
Contrast : Normal
Custom Rendered : Normal
Date/Time Original : 2008:02:09 23:57:48+02:00
Digital Zoom Ratio : 0
Exif Version : 0220
Exposure Compensation : 0
Exposure Mode : Auto
Exposure Program : Program AE
Exposure Time : 1/59
F Number : 2.7
File Source : Digital Camera
Flashpix Version : 0100
Focal Length : 7.5 mm
Focal Length In 35mm Format : 36 mm
Gain Control : Low gain up
ISO : 64
Light Source : Unknown
Max Aperture Value : 2.7
Metering Mode : Multi-segment
Exif Image Width : 3264
Exif Image Height : 2448
Saturation : Normal
Scene Capture Type : Standard
Scene Type : Directly photographed
Sharpness : Normal
Subject Distance Range : Unknown
User Comment :
Compression : JPEG (old-style)
Image Description :
Make : NIKON
Camera Model Name : COOLPIX P4
Orientation : Horizontal (normal)
Resolution Unit : inches
Software : COOLPIX P4V1.1
X Resolution : 300
Y Cb Cr Positioning : Co-sited
Y Resolution : 300
Create Date : 2008:02:09 23:57:48+02:00
Modify Date : 2008:02:09 23:57:48+02:00
---- Composite ----
Aperture : 2.7
Image Size : 488x380
Preview Image : (Binary data 6797 bytes, use -b option
to extract)
Scale Factor To 35 mm Equivalent: 4.8
Shutter Speed : 1/59
Thumbnail Image : (Binary data 2359 bytes, use -b option
to extract)
Circle Of Confusion : 0.006 mm
Field Of View : 53.1 deg
Focal Length : 7.5 mm (35 mm equivalent: 36.0 mm)
Hyperfocal Distance : 3.33 m
Light Value : 9.4
# A copy of that file, but without any metadata
poletti@Polebian:~/sviluppo/perl/rotob$ exiftool -g dscn4465-bare.jpg
---- ExifTool ----
ExifTool Version Number : 7.30
---- File ----
File Name : dscn4465-target.jpg
Directory : .
File Size : 24 kB
File Modification Date/Time : 2008:06:08 04:18:25
File Type : JPEG
MIME Type : image/jpeg
Image Width : 488
Image Height : 380
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
---- Composite ----
Image Size : 488x380
# Make a copy of the "bare" file
poletti@Polebian:~/sviluppo/perl/rotob$ cp dscn4465-bare.jpg
dscn4465-target.jpg
# Duplicate metadata in dscn4465-mini.jpg into the copied file
poletti@Polebian:~/sviluppo/perl/rotob$ exiftool -TagsFromFile
dscn4465-mini.jpg dscn4465-target.jpg
1 image files updated
# Examine the target: the preview is incorrect
poletti@Polebian:~/sviluppo/perl/rotob$ exiftool -g dscn4465-target.jpg
---- ExifTool ----
ExifTool Version Number : 7.30
---- File ----
File Name : dscn4465-target.jpg
Directory : .
File Size : 31 kB
File Modification Date/Time : 2008:06:08 04:19:50
File Type : JPEG
MIME Type : image/jpeg
Exif Byte Order : Little-endian (Intel, II)
Image Width : 488
Image Height : 380
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
---- EXIF ----
Image Description :
Make : NIKON
Camera Model Name : COOLPIX P4
Orientation : Horizontal (normal)
X Resolution : 300
Y Resolution : 300
Resolution Unit : inches
Software : COOLPIX P4V1.1
Modify Date : 2008:02:09 23:57:48
Exposure Time : 1/59
F Number : 2.7
Exposure Program : Program AE
ISO : 64
Exif Version : 0220
Date/Time Original : 2008:02:09 23:57:48
Create Date : 2008:02:09 23:57:48
Components Configuration : YCbCr
Exposure Compensation : 0
Max Aperture Value : 2.7
Metering Mode : Multi-segment
Light Source : Unknown
Flash : Auto, Fired
Focal Length : 7.5 mm
User Comment :
Flashpix Version : 0100
Color Space : sRGB
Exif Image Width : 3264
Exif Image Height : 2448
File Source : Digital Camera
Scene Type : Directly photographed
Custom Rendered : Normal
Exposure Mode : Auto
Digital Zoom Ratio : 0
Focal Length In 35mm Format : 36 mm
Scene Capture Type : Standard
Gain Control : Low gain up
Contrast : Normal
Saturation : Normal
Sharpness : Normal
Subject Distance Range : Unknown
Thumbnail Offset : 1910
Thumbnail Length : 2359
---- MakerNotes ----
Maker Note Version : 2.00
Quality : Fine
White Balance : Auto
Focus Mode : AF-S
Flash Setting : Normal
ISO Selection : Auto
Preview Image Start : 1680
Preview Image Length : 0
Image Processing :
Image Adjustment : Auto
Auxiliary Lens : Off
Manual Focus Distance : inf
Digital Zoom : 0
AF Area Mode : Single Area
AF Point : Center
AF Points In Focus : Center
Scene Mode :
Noise Reduction : Off
WB RBGG Levels : 0 0 0 0
Scene Assist :
Retouch History : None
Image Stabilization : VR-ON
---- XMP ----
Compressed Bits Per Pixel : 4
Color Mode : Color
Compression : JPEG (old-style)
Y Cb Cr Positioning : Co-sited
---- Composite ----
Aperture : 2.7
Image Size : 488x380
Scale Factor To 35 mm Equivalent: 4.8
Shutter Speed : 1/59
Thumbnail Image : (Binary data 2359 bytes, use -b option
to extract)
Circle Of Confusion : 0.006 mm
Field Of View : 53.1 deg
Focal Length : 7.5 mm (35 mm equivalent: 36.0 mm)
Hyperfocal Distance : 3.33 m
Light Value : 9.4
Subject: | dscn4465-bare.jpg |
Subject: | dscn4465-mini.jpg |
Subject: | dscn4465-target.jpg |