1. Welcome to NikonCafe.com—a friendly Nikon camera & photography discussion forum!

    If you are thinking of buying a camera or need help with your photos, you will find our forum members full of advice! Click here to join for free!

EXIF Code for Lens?

Discussion in 'General Technical Discussion' started by Jez, Jul 14, 2005.

  1. Jez


    Jun 22, 2005
    Hello everyone!

    Must be the uncommonly high temperatures we're experiencing in the UK at the moment (is this what summer is supposed to feel like?!!), but I'm getting rather technical at the moment..... :shock:

    Anyway, does anyone know what the EXIF code is that stores the lens type in a D70 and D2X NEF?

    And is this information encrypted?

    Answers on a postcard to the usual address.....

  2. heiko


    May 15, 2005
    Hello Jez,

    Not sure this is of help, but you could try and get the Opanda IExif software (free version for download) to get a peek at some converted jpg files (don't use PS web conversion, better use NikonView or NC which preserve the EXIF info).

    The information you get is something like this (check near the bottom for lens info):

    Model = NIKON D70
    Orientation = top/left
    X Resolution = 300
    Y Resolution = 300
    Resolution Unit = inch
    Software = Nikon Browser 6.2.1 W
    Date Time = 2005-05-31 23:13:48
    YCbCr Positioning = centered
    Exif IFD Pointer = Offset: 220

    Exposure Time = 1/30"
    F Number = F7.1
    Exposure Program = Aperture priority
    Exif Version = Version 2.2
    Date Time Original = 2005-05-25 19:26:32
    Date Time Digitized = 2005-05-25 19:26:32
    Components Configuration = YCbcr
    Exposure Bias Value = ±0EV
    Max Aperture Value = F1.74
    Metering Mode = Pattern
    Light Source = Fine weather
    Flash = Off
    Focal Length = 24mm
    Maker Note = 7876 Byte
    User Comment = (C) Heiko Sieger
    Subsec Time = 0.90"
    Subsec Time Original = 0.90"
    Subsec Time Digitized = 0.90"
    Flashpix Version = Version 1.0
    Color Space = sRGB
    Exif Image Width = 800
    Exif Image Height = 531
    Interoperability IFD Pointer = Offset: 682
    Sensing Method = One-chip color area sensor
    File Source = DSC
    Scene Type = A directly photographed image
    CFA Pattern =

    Interoperability Index = ExifR98
    Interoperability Version = 00, 01, 00, 00

    [Thumbnail Info]
    Compression = JPEG Compressed (Thumbnail)
    X Resolution = 300
    Y Resolution = 300
    Resolution Unit = inch
    JPEG Interchange Format = Offset: 8786
    JPEG Interchange Format Length = Length: 1891

    Thumbnail = 160 x 106

    [MakerNote (Nikon)]
    Makernote Version = 0200
    ISO Speed Used = 200
    Quality = RAW
    White Balance = SUNNY
    Sharpening = NONE
    Focus Mode = AF-S
    White Balance Bias Value = 0
    White Balance Red, Blue Coefficients = 20625/10000, 159765625/100000000, 0/1, 0/1
    000D = 00, 01, 06, 00
    Exposure Diff = 00, 01, 0C, 00
    ThumbOffset = 7870
    ISO Speed Requested = 200
    0017 = 00, 01, 06, 00
    Flash Bracket Compensation Applied = 00, 01, 06, 00
    AE Bracket Compensation Applied = 0EV
    Tone Compensation (Contrast) = NORMAL
    Lens Type = 2
    Lens Min/Max Focal Length, Max Aperture = 24/1, 24/1, 18/10, 18/10
    Flash Used = Flash Not Used
    Auto Focus Area = 00, 02, 00, 04
    Bracketing & Shooting Mode = 0

    The IExif output has "Tag" codes which may or may not relate to the EXIF codes you look for. I'm unfortunately no expert on that.

    Here the download website for IExif:


    Good luck!
  3. joecolson


    Jan 28, 2005
    Cary, NC
    The lens information is stored in a Nikon MakerNote, not in standard EXIF. Heiko is right on.
  4. heiko


    May 15, 2005
    Hi Jez,

    Another thought. Depending on what you want to achieve, it may be a good idea to copy the EXIF data into the IPTC fields during image transfer from camera to PC.

    To do this, you can use NikonTransfer (part of NikonView). When you start a transfer, press the Setup or Information (i) icon and select Transfer shooting data (or EXIF) data into IPTC field (something like that - haven't got NikonTransfer opened now).

    IPTC fields can be read by various programs, and I heard that the info is usually preserved by many programs. Here an example on how it appears under the IPTC tag in Opanda IExif (after copying the value into a text file):

    [#Beginning of Shooting Data Section]
    Nikon D70

    Focal Length: 24mm

    Optimize Image: Custom

    Color Mode: Mode II (Adobe RGB)

    Noise Reduction: OFF

    2005/06/05 12:56:57.8

    Exposure Mode: Aperture Priority

    White Balance: Direct sunlight

    Tone Comp: Normal

    RAW (12-bit) Lossless

    Metering Mode: Multi-Pattern

    AF Mode: AF-S

    Hue Adjustment: 0°

    Image Size: Large (3008 x 2000)

    1/320 sec - F/8

    Flash Sync Mode: Not Attached

    Saturation: Normal

    Exposure Comp.: 0 EV

    Sharpening: None

    Lens: 24mm F/1.8 D

    Sensitivity: ISO 200

    Image Comment: (C) Heiko Sieger

    [#End of Shooting Data Section]

    If you need the lens information for reference, this would be helpful, I guess. The lens I used for above picture is a Sigma 24mm f1.8 D prime lens.

    Using IExif on NC or NikonView converted jpgs even lets you have the total number of shutter releases that the camera had (at least on the D70). If you ever buy a camera second hand, this is one of the most useful values, except general condition of the camera, of course. For example, I reset the file numbering at one point, but the no. of shutter release information is still true. I'm not sure other Nikon cameras have this information, but I would think so.

  5. Jez


    Jun 22, 2005
    Wow - I'm rapidly getting out of my depth!

    I've used Nikon Capture to transfer the EFIX info into the IPTC caption and it's the lens data that I found interesting.

    I'm using Portfolio for cataloging and I'd rather use this for download as well so I can catalog as I go. There's a load of pre-configured EXIF fields it can read from the NEF, but it also allows you to define your own based on "manufacturer's own codes" as they put it.

    So I'm guessing that somewhere in the EXIF makernote is a field that describes the lens. And that's what I'm trying to find out.

    If it can't then I'll stick with NC and then go to Portfolio.

    By the way, I'm on a Mac so Opanda was no good for me - but thanks for your help all the same!
  6. Jez,
    IrfanView, another freebie, also reads the Maker Notes, including a lens number and focal length range of the lens. I don't know if there's a version for the Mac, but it might be worth looking into.
  7. Jez


    Jun 22, 2005
    Hi Bob,

    Irfanview is PC only as well :(  but thanks for the suggestion.

    I think I'll stick with NC as my downloader for now..... :wink:
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.