Extended set of data to be written

Started by tadej, May 05, 2014, 09:59:18 AM

Previous topic - Next topic

Phil Harvey

Hi Dusan,

Quote from: tadej on May 20, 2014, 07:17:51 AM
1. How stable are Tag names: for example is GPS Altitude Ref tag name fixed or does it cange in versions.
2. How stable are Tag values: for example does the structure and formatting : Above Sea Level always look like this or does it change in versions.

Very stable.

Quote3. Some Tag values a bit descriptive.  Rotate 270 CW for example or   57 m Above Sea Level . Can you please list or point to all of possible combinations for Camera rotation and GPS Altitude.

See the Tag Name documentation.

Quote4. Is it possible to get similar values where Tag names would be like this: 0x9003 ?

You can add the -H option to the command to see the tag ID's in hex.

Quote5. Is it possible to write/read GPStime in fractions of seconds and how does that formatting look like ?

> exiftool a.jpg -gpstimestamp=10:01:02.123456789
    1 image files updated
> exiftool a.jpg -gpstimestamp
GPS Time Stamp                  : 10:01:02.123457


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

tadej

Thanks Phil,
I'll stick to the ascii names because some GPS tags do not have HEX representation.
Best
Dusan

tadej

Hi Phil,
I have noticed that after I  write GSPdata into image some original tags went missing.
I would like to reconstruct back the tag which tells when the image was originally taken.

From what I  understand there are two tags which I should update:
Date/Time Original and Create Date

In this respect I have questions:

1. When I will read tags from original image (as created by camera) which tag is the right one if both tags are present but they show different values.
2. Would you know why both tags are neded. Is this a kind of EXIF missuse by camera creators or what ?
3. Can  it happen that one tag is present and the other is not (image created by camera) ?
4. How do I format a command to write tag to image (is -createdate 2013:10:03 09:55:07.123 formated correctly , what is correct tag command for Date/Time Original) ?

Best regards,
Dusan

Phil Harvey

Quote from: tadej on May 22, 2014, 12:45:31 AM
I have noticed that after I  write GSPdata into image some original tags went missing.

Using ExifTool?  What tags went missing?  This shouldn't happen.

QuoteFrom what I  understand there are two tags which I should update:
Date/Time Original and Create Date

In this respect I have questions:

1. When I will read tags from original image (as created by camera) which tag is the right one if both tags are present but they show different values.

I can't answer this.

[/quote]2. Would you know why both tags are neded. Is this a kind of EXIF missuse by camera creators or what ?[/quote]

One tag is the date of the image content, and the other is the date the image was created.  These are usually the same for digital pictures, but different for scanned images.

Quote3. Can  it happen that one tag is present and the other is not (image created by camera) ?

I don't know.

Quote4. How do I format a command to write tag to image (is -createdate 2013:10:03 09:55:07.123 formated correctly ,

exiftool -createdate="2013:10:03 09:55:07.123" FILE

Quotewhat is correct tag command for Date/Time Original) ?

The same, but use -datetimeoriginal instead.

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

tadej

QuoteUsing ExifTool?  What tags went missing?  This shouldn't happen.

Phil please find two images attached. Original and written one. Sorry server refused upload.
Yes, I do use EXIFtool. Sure.

This is concatenated cmd string.
-gpsaltitude=41 -gpsaltituderef=above -gpslatituderef=north -gpslongituderef=west -gpslatitude=51.525889 -gpslongitude=-0.11736 -gpsdatestamp=2014:05:14 -gpstimestamp=12:30:1 "C:\Users\Dusko23\Desktop\2_IMGA0189.jpg"

Regards,
Dusan

Phil Harvey

You can email them to me (philharvey66 at gmail.com)

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

Phil Harvey

I got the images, thanks.

> exiftool DSCN0021original.JPG -a -u -G1 >t1
> exiftool 16_DSCN0021gpstagswritten.jpg -a -u -G1 >t2
> diff t1 t2
2c2
< [System]        File Name                       : DSCN0021original.JPG
---
> [System]        File Name                       : 16_DSCN0021gpstagswritten.jpg
4,7c4,7
< [System]        File Size                       : 2.7 MB
< [System]        File Modification Date/Time     : 2014:05:22 13:18:00-04:00
< [System]        File Access Date/Time           : 2014:05:22 13:18:10-04:00
< [System]        File Inode Change Date/Time     : 2014:05:22 13:18:00-04:00
---
> [System]        File Size                       : 443 kB
> [System]        File Modification Date/Time     : 2014:05:22 13:18:04-04:00
> [System]        File Access Date/Time           : 2014:05:22 13:18:04-04:00
> [System]        File Inode Change Date/Time     : 2014:05:22 13:18:04-04:00
11,13c11,13
< [File]          Exif Byte Order                 : Little-endian (Intel, II)
< [File]          Image Width                     : 4000
< [File]          Image Height                    : 3000
---
> [File]          Exif Byte Order                 : Big-endian (Motorola, MM)
> [File]          Image Width                     : 1000
> [File]          Image Height                    : 750
17,23c17,23
< [File]          Y Cb Cr Sub Sampling            : YCbCr4:2:2 (2 1)
< [IFD0]          Image Description               :
< [IFD0]          Make                            : NIKON
< [IFD0]          Camera Model Name               : COOLPIX S570
< [IFD0]          Orientation                     : Horizontal (normal)
< [IFD0]          X Resolution                    : 300
< [IFD0]          Y Resolution                    : 300
---
> [File]          Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
> [JFIF]          JFIF Version                    : 1.01
> [JFIF]          Resolution Unit                 : inches
> [JFIF]          X Resolution                    : 96
> [JFIF]          Y Resolution                    : 96
> [IFD0]          X Resolution                    : 96
> [IFD0]          Y Resolution                    : 96
25,117c25,36
< [IFD0]          Software                        : COOLPIX S570V1.0
< [IFD0]          Modify Date                     : 2014:05:13 13:00:27
< [IFD0]          Y Cb Cr Positioning             : Co-sited
< [ExifIFD]       Exposure Time                   : 1/25
< [ExifIFD]       F Number                        : 2.7
< [ExifIFD]       Exposure Program                : Program AE
< [ExifIFD]       ISO                             : 400
< [ExifIFD]       Exif Version                    : 0220
< [ExifIFD]       Date/Time Original              : 2014:05:13 13:00:27
< [ExifIFD]       Create Date                     : 2014:05:13 13:00:27
< [ExifIFD]       Components Configuration        : Y, Cb, Cr, -
< [ExifIFD]       Compressed Bits Per Pixel       : 2
< [ExifIFD]       Exposure Compensation           : 0
< [ExifIFD]       Max Aperture Value              : 2.7
< [ExifIFD]       Metering Mode                   : Multi-segment
< [ExifIFD]       Light Source                    : Unknown
< [ExifIFD]       Flash                           : Auto, Fired
< [ExifIFD]       Focal Length                    : 5.0 mm
< [ExifIFD]       User Comment                    :
< [ExifIFD]       Flashpix Version                : 0100
< [ExifIFD]       Color Space                     : sRGB
< [ExifIFD]       Exif Image Width                : 4000
< [ExifIFD]       Exif Image Height               : 3000
< [ExifIFD]       File Source                     : Digital Camera
< [ExifIFD]       Scene Type                      : Directly photographed
< [ExifIFD]       Custom Rendered                 : Normal
< [ExifIFD]       Exposure Mode                   : Auto
< [ExifIFD]       White Balance                   : Auto
< [ExifIFD]       Digital Zoom Ratio              : 0
< [ExifIFD]       Focal Length In 35mm Format     : 28 mm
< [ExifIFD]       Scene Capture Type              : Portrait
< [ExifIFD]       Gain Control                    : High gain up
< [ExifIFD]       Contrast                        : Normal
< [ExifIFD]       Saturation                      : Normal
< [ExifIFD]       Sharpness                       : Normal
< [ExifIFD]       Subject Distance Range          : Unknown
< [Nikon]         Maker Note Version              : 2.00
< [Nikon]         ISO                             : 0
< [Nikon]         Color Mode                      : Color
< [Nikon]         Quality                         : Normal
< [Nikon]         White Balance                   : Auto
< [Nikon]         Sharpness                       : Auto
< [Nikon]         Focus Mode                      : AF-S
< [Nikon]         Flash Setting                   : Normal
< [Nikon]         Nikon 0x000a                    : 7.791
< [Nikon]         White Balance Fine Tune         : 0
< [Nikon]         ISO Selection                   : Auto
< [Nikon]         Data Dump                       : (Binary data 1 bytes, use -b option to extract)
< [Nikon]         Image Processing                :
< [Nikon]         Face Detect Frame Size          : 320 240
< [Nikon]         Faces Detected                  : 0
< [Nikon]         Nikon 0x0026                    : 256 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
< [Nikon]         Nikon 0x002d                    : 256 0
< [Nikon]         Nikon 0x002e                    : 1
< [Nikon]         Nikon 0x002f                    : 0
< [Nikon]         Nikon 0x0030                    : 0
< [Nikon]         Image Adjustment                : Normal
< [Nikon]         Manual Focus Distance           : undef
< [Nikon]         Digital Zoom                    : 1
< [Nikon]         AF Area Mode                    : Single Area
< [Nikon]         AF Point                        : Center
< [Nikon]         AF Points In Focus              : Center
< [Nikon]         Scene Mode                      :
< [Nikon]         Saturation                      : 0
< [Nikon]         Noise Reduction                 : Off
< [Nikon]         Nikon 0x009b                    : 0 0
< [Nikon]         Scene Assist                    :
< [Nikon]         Nikon 0x009d                    : 0
< [Nikon]         Retouch History                 : None
< [Nikon]         Nikon 0x009f                    : 0
< [Nikon]         Image Stabilization             : VR-Off
< [Nikon]         Nikon 0x00b2                    : Normal
< [Nikon]         Nikon 0x00b5                    : 4113
< [Nikon]         Nikon 0xf000                    :
< [Nikon]         Nikon 0xf001                    : 0
< [PreviewIFD]    Compression                     : JPEG (old-style)
< [PreviewIFD]    X Resolution                    : 300
< [PreviewIFD]    Y Resolution                    : 300
< [PreviewIFD]    Resolution Unit                 : inches
< [PreviewIFD]    Preview Image Start             : 2694
< [PreviewIFD]    Preview Image Length            : 19841
< [PreviewIFD]    Y Cb Cr Positioning             : Co-sited
< [InteropIFD]    Interoperability Index          : R98 - DCF basic file (sRGB)
< [InteropIFD]    Interoperability Version        : 0100
< [IFD1]          Compression                     : JPEG (old-style)
< [IFD1]          X Resolution                    : 300
< [IFD1]          Y Resolution                    : 300
< [IFD1]          Resolution Unit                 : inches
< [IFD1]          Thumbnail Offset                : 33674
< [IFD1]          Thumbnail Length                : 5565
< [Composite]     Aperture                        : 2.7
< [Composite]     Base Name                       : DSCN0021original
< [Composite]     File Extension                  : JPG
---
> [IFD0]          Y Cb Cr Positioning             : Centered
> [GPS]           GPS Version ID                  : 2.3.0.0
> [GPS]           GPS Latitude Ref                : North
> [GPS]           GPS Latitude                    : 51.517053
> [GPS]           GPS Longitude Ref               : West
> [GPS]           GPS Longitude                   : 0.114046
> [GPS]           GPS Altitude Ref                : Above Sea Level
> [GPS]           GPS Altitude                    : 45 m
> [GPS]           GPS Time Stamp                  : 10:59:09
> [GPS]           GPS Date Stamp                  : 2014:05:13
> [Composite]     Base Name                       : 16_DSCN0021gpstagswritten
> [Composite]     File Extension                  : jpg
119,130c38,44
< [Composite]     Image Size                      : 4000x3000
< [Composite]     Physical Image Size             : 13.3x10.0 inches
< [Composite]     Preview Image                   : (Binary data 19841 bytes, use -b option to extract)
< [Composite]     Scale Factor To 35 mm Equivalent: 5.6
< [Composite]     Shutter Speed                   : 1/25
< [Composite]     Thumbnail Image                 : (Binary data 5565 bytes, use -b option to extract)
< [Composite]     Big Image                       : (Binary data 19841 bytes, use -b option to extract)
< [Composite]     Circle Of Confusion             : 0.004 mm
< [Composite]     Field Of View                   : 65.5 deg
< [Composite]     Focal Length                    : 5.0 mm (35 mm equivalent: 28.0 mm)
< [Composite]     Hyperfocal Distance             : 2.10 m
< [Composite]     Light Value                     : 5.5
---
> [Composite]     GPS Altitude                    : 45 m Above Sea Level
> [Composite]     GPS Date/Time                   : 2014:05:13 10:59:09Z
> [Composite]     GPS Latitude                    : 51.517053 N
> [Composite]     GPS Longitude                   : 0.114046 W
> [Composite]     GPS Position                    : 51.517053 N, 0.114046 W
> [Composite]     Image Size                      : 1000x750
> [Composite]     Physical Image Size             : 10.4x7.8 inches


So the Nikon information is missing from the modified file.  But the file was also resized by some software.  I blame that software for the loss of this information.

I don't see this problem when I then try to reproduce your steps using ExifTool alone:

> exiftool DSCN0021original.JPG -gpsaltitude=41 -gpsaltituderef=above -gpslatituderef=north -gpslongituderef=west -gpslatitude=51.525889 -gpslongitude=-0.11736 -gpsdatestamp=2014:05:14 -gpstimestamp=12:30:1
    1 image files updated
> exiftool DSCN0021original.JPG -a -u -G1 >t2
> diff t1 t2
5,7c5,7
< [System]        File Modification Date/Time     : 2014:05:22 13:18:00-04:00
< [System]        File Access Date/Time           : 2014:05:22 13:18:10-04:00
< [System]        File Inode Change Date/Time     : 2014:05:22 13:18:00-04:00
---
> [System]        File Modification Date/Time     : 2014:05:22 13:20:23-04:00
> [System]        File Access Date/Time           : 2014:05:22 13:20:23-04:00
> [System]        File Inode Change Date/Time     : 2014:05:22 13:20:23-04:00
104c104
< [PreviewIFD]    Preview Image Start             : 2694
---
> [PreviewIFD]    Preview Image Start             : 8622
108a109,117
> [GPS]           GPS Version ID                  : 2.3.0.0
> [GPS]           GPS Latitude Ref                : North
> [GPS]           GPS Latitude                    : 51.525889
> [GPS]           GPS Longitude Ref               : West
> [GPS]           GPS Longitude                   : 0.117360
> [GPS]           GPS Altitude Ref                : Above Sea Level
> [GPS]           GPS Altitude                    : 41 m
> [GPS]           GPS Time Stamp                  : 12:30:01
> [GPS]           GPS Date Stamp                  : 2014:05:14
113c122
< [IFD1]          Thumbnail Offset                : 33674
---
> [IFD1]          Thumbnail Offset                : 3056
118a128,132
> [Composite]     GPS Altitude                    : 41 m Above Sea Level
> [Composite]     GPS Date/Time                   : 2014:05:14 12:30:01Z
> [Composite]     GPS Latitude                    : 51.525889 N
> [Composite]     GPS Longitude                   : 0.117360 W
> [Composite]     GPS Position                    : 51.525889 N, 0.117360 W


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

tadej

Thanks Phil,
yes my software does several resizining in order to create task dependat images all in 100% Q jpg.
Original image, Panoramio/Picasa size, KML Thumbnail image, KML balloon image, TimeLine image.
And yes they all lost most of Tags. Unfortunately I did realize it after I inserted GPSdata.
Sorry for confusion  ;).
Regards,
Dusan