Closed ESmilic closed 8 years ago
Indeed, the main image dimensions seem to be omitted.
For reference, that image gives:
[File] File Name = DSC_0003.NEF
[File] File Size = 17180885 bytes
[File] File Modified Date = Tue Apr 21 21:12:27 BST 2015
[Nikon Makernote] Firmware Version = 2.10
[Nikon Makernote] ISO = ISO 200
[Nikon Makernote] Quality & File Format = RAW
[Nikon Makernote] White Balance = AUTO
[Nikon Makernote] AF Type = AF-A
[Nikon Makernote] Flash Sync Mode =
[Nikon Makernote] Auto Flash Mode =
[Nikon Makernote] White Balance Fine = 0 0
[Nikon Makernote] White Balance RB Coefficients = 541/256 340/256 256/256 256/256
[Nikon Makernote] Program Shift = 0 EV
[Nikon Makernote] Exposure Difference = 0 EV
[Nikon Makernote] Preview IFD = 16126
[Nikon Makernote] Auto Flash Compensation = 0 EV
[Nikon Makernote] ISO = 0 200
[Nikon Makernote] Flash Exposure Compensation = 0 EV
[Nikon Makernote] Flash Bracket Compensation = 0 EV
[Nikon Makernote] AE Bracket Compensation = 0
[Nikon Makernote] Crop High Speed = 0 4992 3280 4992 3280 0 0
[Nikon Makernote] Exposure Tuning = 0 EV
[Nikon Makernote] Camera Serial Number = 7258228
[Nikon Makernote] Color Space = sRGB
[Nikon Makernote] VR Info = 48 49 48 48 2 2 0 0
[Nikon Makernote] Active D-Lighting = Auto
[Nikon Makernote] Picture Control = [58 bytes]
[Nikon Makernote] World Time = 0 120 1 2
[Nikon Makernote] ISO Info = 72 1 12 0 0 0 72 1 12 0 0 0 0 2
[Nikon Makernote] Unknown 40 = 48 49 48 48 1 4 1 9 0 0 0 0 0 0 0 0
[Nikon Makernote] Unknown 41 = [574 bytes]
[Nikon Makernote] Unknown 42 = 512 0 0
[Nikon Makernote] Unknown tag (0x0032) = 48 49 48 48 0 0 0 1
[Nikon Makernote] Lens Type = AF, D, G, VR
[Nikon Makernote] Lens = 18-55mm f/3.5-5.6
[Nikon Makernote] Flash Used = Flash Not Used
[Nikon Makernote] Shooting Mode = Single Frame
[Nikon Makernote] Unknown 20 = 1
[Nikon Makernote] Lens Stops = 5.33 EV
[Nikon Makernote] Contrast Curve = [578 bytes]
[Nikon Makernote] Shot Info = [8902 bytes]
[Nikon Makernote] NEF Compression = Unknown (4)
[Nikon Makernote] Noise Reduction = OFF
[Nikon Makernote] Linearization Table = [624 bytes]
[Nikon Makernote] Color Balance = [608 bytes]
[Nikon Makernote] Lens Data = [33 bytes]
[Nikon Makernote] NEF Thumbnail Size = 2496 1640
[Nikon Makernote] Unknown 11 = 0
[Nikon Makernote] Retouch History = 0 0 0 0 0 0 0 0 0 0
[Nikon Makernote] Unknown 27 = 0
[Nikon Makernote] Unknown 28 = 48 50 48 48
[Nikon Makernote] Exposure Sequence Number = 250
[Nikon Makernote] Flash Info = [46 bytes]
[Nikon Makernote] Digital Vari Program = AUTO(FLASH OFF)
[Nikon Makernote] Multi Exposure = 48 49 48 48 0 0 0 0 0 0 0 0 0 0 0 0
[Nikon Makernote] High ISO Noise Reduction = Normal
[Nikon Makernote] Power Up Time = null
[Nikon Makernote] AF Info 2 = [30 bytes]
[Nikon Makernote] File Info = [172 bytes]
[Nikon Makernote] Unknown 49 = 48 50 48 48 -1 -1 -1 0
[Nikon Makernote] Unknown tag (0x00bc) = [3480 bytes]
[Exif IFD0] New Subfile Type = Full-resolution image
[Exif IFD0] Image Width = 160 pixels
[Exif IFD0] Image Height = 120 pixels
[Exif IFD0] Bits Per Sample = 8 8 8 bits/component/pixel
[Exif IFD0] Compression = Uncompressed
[Exif IFD0] Photometric Interpretation = RGB
[Exif IFD0] Make = NIKON CORPORATION
[Exif IFD0] Model = NIKON D5100
[Exif IFD0] Strip Offsets = 124144
[Exif IFD0] Orientation = Top, left side (Horizontal / normal)
[Exif IFD0] Samples Per Pixel = 3 samples/pixel
[Exif IFD0] Rows Per Strip = 120 rows/strip
[Exif IFD0] Strip Byte Counts = 57600 bytes
[Exif IFD0] X Resolution = 300 dots per inch
[Exif IFD0] Y Resolution = 300 dots per inch
[Exif IFD0] Planar Configuration = Chunky (contiguous for each subsampling pixel)
[Exif IFD0] Resolution Unit = Inch
[Exif IFD0] Software = Ver.1.01
[Exif IFD0] Date/Time = 2014:08:12 09:30:58
[Exif IFD0] Sub IFD Pointer(s) = 181744 181864
[Exif IFD0] Reference Black/White = [0,0,0] [255,255,255]
[Exif IFD0] Date/Time Original = 2014:08:12 09:30:58
[Exif IFD0] TIFF/EP Standard ID = 1 0 0 0
[Exif SubIFD] Exposure Time = 1/160 sec
[Exif SubIFD] F-Number = f/6.3
[Exif SubIFD] Exposure Program = Unknown (0)
[Exif SubIFD] ISO Speed Ratings = 200
[Exif SubIFD] Sensitivity Type = Recommended Exposure Index
[Exif SubIFD] Date/Time Original = 2014:08:12 09:30:58
[Exif SubIFD] Date/Time Digitized = 2014:08:12 09:30:58
[Exif SubIFD] Exposure Bias Value = 0 EV
[Exif SubIFD] Max Aperture Value = f/4.6
[Exif SubIFD] Metering Mode = Multi-segment
[Exif SubIFD] White Balance = Unknown
[Exif SubIFD] Flash = Flash did not fire, auto
[Exif SubIFD] Focal Length = 30.0 mm
[Exif SubIFD] User Comment =
[Exif SubIFD] Sub-Sec Time = 10
[Exif SubIFD] Sub-Sec Time Original = 10
[Exif SubIFD] Sub-Sec Time Digitized = 10
[Exif SubIFD] Sensing Method = One-chip color area sensor
[Exif SubIFD] File Source = Digital Still Camera (DSC)
[Exif SubIFD] Scene Type = Directly photographed image
[Exif SubIFD] CFA Pattern = 0 2 0 2 0 1 1 2
[Exif SubIFD] Custom Rendered = Normal process
[Exif SubIFD] Exposure Mode = Auto exposure
[Exif SubIFD] White Balance Mode = Auto white balance
[Exif SubIFD] Digital Zoom Ratio = 1
[Exif SubIFD] Focal Length 35 = 45mm
[Exif SubIFD] Scene Capture Type = Standard
[Exif SubIFD] Gain Control = None
[Exif SubIFD] Contrast = None
[Exif SubIFD] Saturation = None
[Exif SubIFD] Sharpness = None
[Exif SubIFD] Subject Distance Range = Unknown
[GPS] GPS Version ID = 2.300
This is the output from raw-identify
binary (http://www.libraw.org/docs/Samples-LibRaw-eng.html) example from the LibRaw library:
$ raw-identify -v DSC_0003.NEF
Filename: Downloads/DSC_0003.NEF
Timestamp: Tue Aug 12 09:30:58 2014
Camera: Nikon D5100
ISO speed: 200
Shutter: 1/160.0 sec
Aperture: f/6.3
Focal length: 30.0 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size: 4928 x 3264
Full size: 4992 x 3280
Image size: 4948 x 3280
Output size: 4948 x 3280
Raw colors: 3
Filter pattern: RGGBRGGBRGGBRGGB
Daylight multipliers: 2.098821 0.925441 1.126505
Just came across this myself, and I could have sworn dimensions were fine from NEF once upon a time. Any further action on this?
If the .NET solution to this is accepted, I'm happy to port it to Java unless somebody else wants to take it.
@kwhopper's changes to the .NET implementation address this issue. I'm porting them to the Java version now.
drewnoakes/metadata-extractor-dotnet#42 has now been ported to this Java version.
For reference, the image attached to this issue gives:
FILE: Nikon D5100.nef
[Exif IFD0 - 0x00fe] New Subfile Type = Full-resolution image
[Exif IFD0 - 0x0100] Image Width = 160 pixels
[Exif IFD0 - 0x0101] Image Height = 120 pixels
[Exif IFD0 - 0x0102] Bits Per Sample = 8 8 8 bits/component/pixel
[Exif IFD0 - 0x0103] Compression = Uncompressed
[Exif IFD0 - 0x0106] Photometric Interpretation = RGB
[Exif IFD0 - 0x010f] Make = NIKON CORPORATION
[Exif IFD0 - 0x0110] Model = NIKON D5100
[Exif IFD0 - 0x0111] Strip Offsets = 124144
[Exif IFD0 - 0x0112] Orientation = Top, left side (Horizontal / normal)
[Exif IFD0 - 0x0115] Samples Per Pixel = 3 samples/pixel
[Exif IFD0 - 0x0116] Rows Per Strip = 120 rows/strip
[Exif IFD0 - 0x0117] Strip Byte Counts = 57600 bytes
[Exif IFD0 - 0x011a] X Resolution = 300 dots per inch
[Exif IFD0 - 0x011b] Y Resolution = 300 dots per inch
[Exif IFD0 - 0x011c] Planar Configuration = Chunky (contiguous for each subsampling pixel)
[Exif IFD0 - 0x0128] Resolution Unit = Inch
[Exif IFD0 - 0x0131] Software = Ver.1.01
[Exif IFD0 - 0x0132] Date/Time = 2014:08:12 09:30:58
[Exif IFD0 - 0x0214] Reference Black/White = [0,0,0] [255,255,255]
[Exif IFD0 - 0x9003] Date/Time Original = 2014:08:12 09:30:58
[Exif IFD0 - 0x9216] TIFF/EP Standard ID = 1 0 0 0
[Exif SubIFD - 0x00fe] New Subfile Type = Full-resolution image
[Exif SubIFD - 0x0103] Compression = JPEG (old-style)
[Exif SubIFD - 0x011a] X Resolution = 300 dots per inch
[Exif SubIFD - 0x011b] Y Resolution = 300 dots per inch
[Exif SubIFD - 0x0128] Resolution Unit = Inch
[Exif SubIFD - 0x0201] Unknown tag (0x0201) = 182144
[Exif SubIFD - 0x0202] Unknown tag (0x0202) = 1470727
[Exif SubIFD - 0x0213] YCbCr Positioning = Datum point
[Exif SubIFD - 0x00fe] New Subfile Type = Unknown (0)
[Exif SubIFD - 0x0100] Image Width = 4992 pixels
[Exif SubIFD - 0x0101] Image Height = 3280 pixels
[Exif SubIFD - 0x0102] Bits Per Sample = 14 bits/component/pixel
[Exif SubIFD - 0x0103] Compression = Nikon NEF Compressed
[Exif SubIFD - 0x0106] Photometric Interpretation = Color Filter Array
[Exif SubIFD - 0x0111] Strip Offsets = 1652896
[Exif SubIFD - 0x0115] Samples Per Pixel = 1 samples/pixel
[Exif SubIFD - 0x0116] Rows Per Strip = 3280 rows/strip
[Exif SubIFD - 0x0117] Strip Byte Counts = 15527989 bytes
[Exif SubIFD - 0x011a] X Resolution = 300 dots per inch
[Exif SubIFD - 0x011b] Y Resolution = 300 dots per inch
[Exif SubIFD - 0x011c] Planar Configuration = Chunky (contiguous for each subsampling pixel)
[Exif SubIFD - 0x0128] Resolution Unit = Inch
[Exif SubIFD - 0x828d] CFA Repeat Pattern Dim = 2 2
[Exif SubIFD - 0x828e] CFA Pattern = 0 1 1 2
[Exif SubIFD - 0x9217] Unknown tag (0x9217) = 2
[Exif SubIFD - 0x829a] Exposure Time = 1/160 sec
[Exif SubIFD - 0x829d] F-Number = f/6.3
[Exif SubIFD - 0x8822] Exposure Program = Unknown (0)
[Exif SubIFD - 0x8827] ISO Speed Ratings = 200
[Exif SubIFD - 0x8830] Sensitivity Type = Recommended Exposure Index
[Exif SubIFD - 0x9003] Date/Time Original = 2014:08:12 09:30:58
[Exif SubIFD - 0x9004] Date/Time Digitized = 2014:08:12 09:30:58
[Exif SubIFD - 0x9204] Exposure Bias Value = 0 EV
[Exif SubIFD - 0x9205] Max Aperture Value = f/4.6
[Exif SubIFD - 0x9207] Metering Mode = Multi-segment
[Exif SubIFD - 0x9208] White Balance = Unknown
[Exif SubIFD - 0x9209] Flash = Flash did not fire, auto
[Exif SubIFD - 0x920a] Focal Length = 30 mm
[Exif SubIFD - 0x9286] User Comment =
[Exif SubIFD - 0x9290] Sub-Sec Time = 10
[Exif SubIFD - 0x9291] Sub-Sec Time Original = 10
[Exif SubIFD - 0x9292] Sub-Sec Time Digitized = 10
[Exif SubIFD - 0xa217] Sensing Method = One-chip color area sensor
[Exif SubIFD - 0xa300] File Source = Digital Still Camera (DSC)
[Exif SubIFD - 0xa301] Scene Type = Directly photographed image
[Exif SubIFD - 0xa302] CFA Pattern = 0 2 0 2 0 1 1 2
[Exif SubIFD - 0xa401] Custom Rendered = Normal process
[Exif SubIFD - 0xa402] Exposure Mode = Auto exposure
[Exif SubIFD - 0xa403] White Balance Mode = Auto white balance
[Exif SubIFD - 0xa404] Digital Zoom Ratio = 1
[Exif SubIFD - 0xa405] Focal Length 35 = 45 mm
[Exif SubIFD - 0xa406] Scene Capture Type = Standard
[Exif SubIFD - 0xa407] Gain Control = None
[Exif SubIFD - 0xa408] Contrast = None
[Exif SubIFD - 0xa409] Saturation = None
[Exif SubIFD - 0xa40a] Sharpness = None
[Exif SubIFD - 0xa40c] Subject Distance Range = Unknown
[Nikon Makernote - 0x0001] Firmware Version = 2.10
[Nikon Makernote - 0x0002] ISO = ISO 200
[Nikon Makernote - 0x0004] Quality & File Format = RAW
[Nikon Makernote - 0x0005] White Balance = AUTO
[Nikon Makernote - 0x0007] AF Type = AF-A
[Nikon Makernote - 0x0008] Flash Sync Mode =
[Nikon Makernote - 0x0009] Auto Flash Mode =
[Nikon Makernote - 0x000b] White Balance Fine = 0 0
[Nikon Makernote - 0x000c] White Balance RB Coefficients = 541/256 340/256 256/256 256/256
[Nikon Makernote - 0x000d] Program Shift = 0 EV
[Nikon Makernote - 0x000e] Exposure Difference = 0 EV
[Nikon Makernote - 0x0011] Preview IFD = 16126
[Nikon Makernote - 0x0012] Auto Flash Compensation = 0 EV
[Nikon Makernote - 0x0013] ISO = 0 200
[Nikon Makernote - 0x0017] Flash Exposure Compensation = 0 EV
[Nikon Makernote - 0x0018] Flash Bracket Compensation = 0 EV
[Nikon Makernote - 0x0019] AE Bracket Compensation = 0
[Nikon Makernote - 0x001b] Crop High Speed = 0 4992 3280 4992 3280 0 0
[Nikon Makernote - 0x001c] Exposure Tuning = 0 EV
[Nikon Makernote - 0x001d] Camera Serial Number = 7258228
[Nikon Makernote - 0x001e] Color Space = sRGB
[Nikon Makernote - 0x001f] VR Info = 48 49 48 48 2 2 0 0
[Nikon Makernote - 0x0022] Active D-Lighting = Auto
[Nikon Makernote - 0x0023] Picture Control = [58 values]
[Nikon Makernote - 0x0024] World Time = 0 120 1 2
[Nikon Makernote - 0x0025] ISO Info = 72 1 12 0 0 0 72 1 12 0 0 0 0 2
[Nikon Makernote - 0x002b] Unknown 40 = 48 49 48 48 1 4 1 9 0 0 0 0 0 0 0 0
[Nikon Makernote - 0x002c] Unknown 41 = [574 values]
[Nikon Makernote - 0x002d] Unknown 42 = 512 0 0
[Nikon Makernote - 0x0032] Unknown tag (0x0032) = 48 49 48 48 0 0 0 1
[Nikon Makernote - 0x0083] Lens Type = AF, D, G, VR
[Nikon Makernote - 0x0084] Lens = 18-55mm f/3.5-5.6
[Nikon Makernote - 0x0087] Flash Used = Flash Not Used
[Nikon Makernote - 0x0089] Shooting Mode = Single Frame
[Nikon Makernote - 0x008a] Unknown 20 = 1
[Nikon Makernote - 0x008b] Lens Stops = 5.33 EV
[Nikon Makernote - 0x008c] Contrast Curve = [578 values]
[Nikon Makernote - 0x0091] Shot Info = [8902 values]
[Nikon Makernote - 0x0093] NEF Compression = Unknown (4)
[Nikon Makernote - 0x0095] Noise Reduction = OFF
[Nikon Makernote - 0x0096] Linearization Table = [624 values]
[Nikon Makernote - 0x0097] Color Balance = [608 values]
[Nikon Makernote - 0x0098] Lens Data = [33 values]
[Nikon Makernote - 0x0099] NEF Thumbnail Size = 2496 1640
[Nikon Makernote - 0x009d] Unknown 11 = 0
[Nikon Makernote - 0x009e] Retouch History = 0 0 0 0 0 0 0 0 0 0
[Nikon Makernote - 0x00a3] Unknown 27 = 0
[Nikon Makernote - 0x00a4] Unknown 28 = 48 50 48 48
[Nikon Makernote - 0x00a7] Exposure Sequence Number = 250
[Nikon Makernote - 0x00a8] Flash Info = [46 values]
[Nikon Makernote - 0x00ab] Digital Vari Program = AUTO(FLASH OFF)
[Nikon Makernote - 0x00b0] Multi Exposure = 48 49 48 48 0 0 0 0 0 0 0 0 0 0 0 0
[Nikon Makernote - 0x00b1] High ISO Noise Reduction = Normal
[Nikon Makernote - 0x00b6] Power Up Time =
[Nikon Makernote - 0x00b7] AF Info 2 = [30 values]
[Nikon Makernote - 0x00b8] File Info = [172 values]
[Nikon Makernote - 0x00bb] Unknown 49 = 48 50 48 48 255 255 255 0
[Nikon Makernote - 0x00bc] Unknown tag (0x00bc) = [3480 values]
[GPS - 0x0000] GPS Version ID = 2.300
[File - 0x0001] File Name = Nikon D5100.nef
[File - 0x0002] File Size = 17180885 bytes
[File - 0x0003] File Modified Date = <omitted for regression testing as checkout dependent>
- Exif IFD0
- Exif SubIFD
- Exif SubIFD
- Exif SubIFD
- Nikon Makernote
- GPS
- File
Note the structure diagram at the end showing various sub IFDs.
Cannot get information about width and height of image
https://www.dropbox.com/s/xk3z9bfxv14etdk/DSC_0003.NEF?dl=0