Image:...erNotes(3pm)

πŸ“¦
version 0.159 Β· 2 versions
  • 0.159 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.153 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

Image::MetaData::JPEG::MakerNotes β€” literally just random information and details on MakerNotes, bestie. That's the whole vibe. πŸ’–


πŸ¦‹ OVERVIEW πŸ¦‹

Okay so this document is a lil collection of random info and deets about MakerNotes. It's an appendix to the main manual page of the Image::MetaData::JPEG module, and you should fr fr go read that one for the bigger picture and the general scope. The note on MakerNote parsing in the main manual page is the one you actually want β€” it's giving main character energy. πŸ‘‘


🌸 Pieces of information available after parsing the MakerNote 🌸

So when the maker note gets parsed, the result gets stored in a directory inside the internal data structure for the APP1 Segment. The path is IFD@SubIFD@MakerNoteData_$format, where $format is the specific note format. And then the MakerNote entry in IFD0@SubIFD is removed. This translation happens always, no cap, because there's a catch-all unknown rule for a binary makernote with very broad acceptance rules. πŸ’…

That maker note directory also has a special subdir with some fields reporting about the parsing process:

  • ORIGINAL β€” the raw content of the maker note (unparsed)
  • SIGNATURE β€” the first few bytes which allowed the format to be chosen
  • ENDIANNESS β€” the byte order chosen during parsing
  • FORMAT β€” the maker note format chosen during parsing
  • ERROR β€” [optional] error details, in case of failure while parsing

✨ Supported MakerNote formats ✨

Maker note formats live in a special internal hash, one key per format (and yes, that includes the unknown format). Every format entry maps to an anonymous hash with the parsing info for the MakerNote. The "normal" format is considered to be an IFD-like MakerNote with a next_link pointer, offsets counted from the global TIFF header, and no MakerNote internal TIFF header.

Here's what the keys mean:

  • signature β€” the MakerNote signature (a regular expression)
  • maker β€” the Maker signature (i.e., its name, no regex)
  • tags β€” a reference to a hash for tag translations
  • (A) mkntstart β€” if set, offsets are counted from the maker note start
  • (B) mkntTIFF β€” if set, offsets are counted from the internal TIFF header
  • (C) ignore β€” if set, the format is to be ignored
  • (D) nonext β€” if set, the maker note IFD does not have a next_link
  • (E) endianness β€” if set, the byte order is fixed to this value
  • (F) nonIFD β€” if set, the maker note is not IFD-like

Currently, the "supported" formats are the ones below. The authoritative data is actually kept in Tables_makernotes.pl, so go there for tag definitions and translations, ok? And remember: both the signature and the maker fields are regular expressions matching at the beginning (the real signature corresponds to $1). 🫢

  • Agfa β€” maker AGFA, signature (AGFA \000\001)
  • Canon β€” maker Canon, signature ()
  • Casio_1 β€” maker CASIO, signature ()[^Q]
  • Casio_2 β€” maker CASIO, signature (QVC\000{3})
  • Epson β€” maker EPSON, signature (EPSON\000\001\000)
  • Foveon β€” maker FOVEON, signature (FOVEON\000{2}\001\000)
  • Fujifilm β€” flag (A) mkntstart, maker FUJIFILM, signature (FUJIFILM\014\000{3})
  • HPackard β€” flag (C) ignore, maker Hewlett-Packard, signature (HP)
  • Kyocera β€” flags (A) mkntstart, (D) nonext, maker KYOCERA, signature (KYOCERA {12}\000{3})
  • Kodak β€” flags (E) endianness, (F) nonIFD, maker KODAK, signature (KDK INFO[a-zA-Z0-9]* )
  • Minolta_1 β€” maker MINOLTA, signature ().{10}MLT0
  • Minolta_2 β€” maker Minolta, signature ().{10}MLT0
  • Konica β€” flag (C) ignore, maker Minolta|KONICA, signature ((MLY|KC|(\+M){4})|\001\000{5}\004)
  • Nikon_1 β€” maker NIKON, signature (Nikon\000\001\000)
  • Nikon_2 β€” maker NIKON, signature ()[^N]
  • Nikon_3 β€” flag (B) mkntTIFF, maker NIKON, signature (Nikon\000\002[\020\000]\000{2})
  • Olympus β€” maker OLYMPUS, signature (OLYMP\000[\001\002]\000)
  • Panasonic_1 β€” flag (D) nonext, maker Panasonic, signature (Panasonic\000{3})
  • Panasonic_2 β€” flags (C) ignore, (D) nonext, maker Panasonic, signature (MKED)
  • Pentax_1 β€” flag (A) mkntstart, maker Asahi, signature ()[^A]
  • Pentax_2 β€” flags (A) mkntstart, (D) nonext, maker Asahi, signature (AOC\000..)
  • Ricoh_1 β€” flag (C) ignore, maker RICOH, signature (Rv|Rev)
  • Ricoh_2 β€” flag (C) ignore, maker RICOH, signature (\000)
  • Ricoh_3 β€” maker RICOH, signature ((Ricoh|RICOH)\000{3})
  • Sanyo β€” maker SANYO, signature (SANYO\000\001\000)
  • Sigma β€” maker SIGMA, signature (SIGMA\000{3}\001\000)
  • Sony β€” flag (D) nonext, maker SONY, signature (SONY (CAM|DSC) \000{3})
  • Toshiba β€” flag (C) ignore, maker TOSHIBA, signature ()
  • unknown β€” flag (E) endianness, maker ., signature ()

πŸ’œ References πŸ’œ

Okay so vendors basically never release MakerNote format details. And when I say "not usually released", that's an euphemism β€” no vendor ever, to the author's knowledge, released any detail on its format, exception made for Sigma/Foveon. πŸ™ˆ Everything used for this package was collected on the Internet (so the reliability is, lowkey, limited) or through personal tests. Some interesting sites, and this is not an exhaustive list at all:

  • General: home.arcor.de/ahuggel/exiv2/makernote.html
  • .....: www.ozhiker.com/electronics/pjmt/jpeg_info/makernotes.html
  • Agfa: www.ozhiker.com/electronics/pjmt/jpeg_info/agfa_mn.html
  • Canon: www.burren.cx/david/canon.html
  • Casio: park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
  • ...: www.dicasoft.de/casiomn.htm
  • Epson: www.ozhiker.com/electronics/pjmt/jpeg_info/epson_mn.html
  • Foveon: Foveon is the same as Sigma, see Sigma
  • Fujifilm: park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
  • ......: www.ozhiker.com/electronics/pjmt/jpeg_info/fujifilm_mn.html
  • Kyocera: www.ozhiker.com/electronics/pjmt/jpeg_info/kyocera_mn.html
  • Kodak: my personal tests with my Kodak DX3900 (not IFD-like)
  • Minolta: www.dalibor.cz/minolta/makernote.htm
  • .....: www.ozhiker.com/electronics/pjmt/jpeg_info/minolta_mn.html
  • Nikon: park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
  • ...: www.tawbaware.com/990exif.htm
  • ...: www.ozhiker.com/electronics/pjmt/jpeg_info/nikon_mn.html
  • Olympus: park2.wakwak.com/~tsuruzoh/Computer/Digicams/exif-e.html
  • .....: www.ozhiker.com/electronics/pjmt/jpeg_info/olympus_mn.html
  • Panasonic: www.compton.nu/panasonic.html
  • Pentax: www.ozhiker.com/electronics/pjmt/jpeg_info/pentax_mn.html
  • Ricoh: www.ozhiker.com/electronics/pjmt/jpeg_info/ricoh_mn.html
  • Sanyo: www.exif.org/makernotes/SanyoMakerNote.html
  • Sigma: www.x3f.info/technotes/FileDocs/MakerNoteDoc.html
  • Sony: www.ozhiker.com/electronics/pjmt/jpeg_info/sony_mn.html

πŸŽ€ DX3900 MakerNote format πŸŽ€

Kodak MakerNotes are written in a proprietary binary format, and it is not IFD-like. So there's genuinely no way to detect the beginning, end and type of a field. Everything here was inferred through a careful comparison of the content of a set of Kodak JPEG files and their shot parameters. πŸ”

Fields seem to be aligned on four bytes boundaries. For the DX3900 model the endianness is always fixed to big endian. The signature regular expression is ^(KDK INFO[a-zA-Z0-9]* ), and the maker is KODAK. The meaning of the tags goes like this:

  • BYTE ??? β€” firmware version? This is always 3
  • BYTE Compression β€” 1 = normal, 2 = 2160x1440 high compression
  • BYTE BurstMode β€” 0 = off, 1 = on
  • BYTE MacroMode β€” 0 = normal, 1 = close-up
  • SHORT PixelXDimension / SHORT PixelYDimension β€” allowed values: 2160x1440, 1800x1200, 1536x1024, 1080x720
  • SHORT Year β€” the year value, with four digits
  • BYTE Month β€” the month value (in [1,12])
  • BYTE Day β€” the day value (in [1,31])
  • BYTE Hour β€” the hour value (in [0,23])
  • BYTE Minute β€” the minute value (in [0,59])
  • BYTE Second β€” the second value (in [0,59])
  • BYTE SubSecond β€” (in 130th of seconds?)
  • SHORT ??? β€” ???
  • BYTE ??? β€” ???
  • BYTE ShutterMode β€” 0 = auto, 32 = manual
  • BYTE MeteringMode β€” 0 = multi-pattern, 1=centre weight., 2=centre spot
  • BYTE BurstSequenceIndex β€” index in [1,8], 0 if burst mode off
  • SHORT FNumber β€” 100 times the Exif F-number
  • LONG ExposureTime β€” in 10^-5 seconds
  • SSHORT ExposureBiasValue β€” 1000 times the exposure bias in [-2,+2 step .5]
  • SHORT ??? β€” ???
  • LONG ??? β€” is this an estimate of the subject distance? If so, it is very rough.
  • LONG ??? β€” is this an estimate of the subject distance? If so, it is very rough.
  • LONG ??? β€” is this an estimate of the subject distance? If so, it is very rough.
  • LONG ??? β€” is this an estimate of the subject distance? If so, it is very rough.
  • BYTE FocusMode β€” 0 = auto, 2 = close, 3 = infinity
  • BYTE ??? β€” always 2
  • SHORT ??? β€” ???
  • SSHORT PanoramaMode β€” 0 = normal, -1 = focus at infinity
  • SHORT SubjectDistance β€” (x-28)*2.54+7 looks like the distance in cm
  • BYTE WhiteBalance β€” 0 = normal, 1 = fluor., 2 = tungsten, 3 = daylight
  • (27 bytes with unknown meaning here)
  • BYTE FlashMode β€” 0 = auto, 1 = on, 2 = off, 3 = red-eyes
  • BYTE FlashFired β€” 0 = yes, 1 = no
  • SHORT ISOSpeedMode β€” the requested speed in {100,200,400} or zero
  • SHORT ??? β€” ???
  • SHORT TotalZoomFactor β€” 100 times the zoom factor in [+1,+6 step 0.1]
  • SHORT DateTimeStampMode β€” 0 = none, [1,6] = the six modes
  • SHORT ColourMode β€” 1 = black & white, 2 = sepia, 32 = colour
  • SHORT DigitalZoomFactor β€” 100 times the zoom factor in [+1,+3 step 0.1]
  • BYTE ??? β€” always zero
  • SBYTE Sharpness β€” 0 = standard, 1 = sharp, -1 = soft
  • (808 bytes with unknown meaning here, maybe a thumbnail?)

πŸ‘‘ AUTHOR πŸ‘‘

Stefano Bettelli, bettelli@cpan.org β€” shoutout to the icon who wrote all this down. πŸ’–


Copyright (C) 2004,2005,2006 by Stefano Bettelli

This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License. See the COPYING and LICENSE file for the license terms.


🌈 SEE ALSO 🌈

The main documentation page for the Image::MetaData::JPEG module. Go read it, bestie, that's the whole point. 🫢


And that's a wrap, no cap β€” this page is perl v5.34.0 coded, dated 2022-03-07, and it ate. πŸ’…βœ¨