Skip to content

flenniken/metar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Metar is a command line program for reading image metadata.

You can read metadata from JPEG, DNG and TIFF images. Metar understands the standard image metadata formats: XMP, IPTC, Exif, and Tiff tags.

You can use metar’s range feature to reverse engineer file formats. It tells all known and unknown bytes in the file. You write code to handle the unknown byte ranges until all are known. This allows you quickly get the basics working and gradually fill in the edge cases over time.

How to Run Metar

You can run metar from the command line to display image metadata. Running metar without any parameters shows how to use it. For example::

metar

Show metadata information for the given image(s).
Usage: metar [-j] [-v] file [file...]
-j --json     Output JSON data.
-v --version  Show the version number.
-h --help     Show this help.
file          Image filename to analyze.

You pass an image filename and metar outputs metadata to the screen, for example::

metar testfiles/image.dng

========== ifd1 ==========
offset = 8
next = 0
NewSubfileType(254) = [1]
ImageWidth(256) = [256]
ImageHeight(257) = [171]
BitsPerSample(258) = [8, 8, 8]
Compression(259) = [1]
PhotometricInterpretation(262) = [2]
Make(271) = ["Canon"]
Model(272) = ["Canon EOS 20D"]
...

Only the first few lines are shown in the example above to save space. For this image there are 291 lines::

metar testfiles/image.dng | wc -l
291
<style>body { max-width: 40em}</style>

More Pages

You can learn how to build, test and install on the development page.

You can learn how metar deals with special images with unknown sections or corrupt files and other details on the details page.

  • details -- metadata processing details

Here is the metar module dependencies graph:

  • dependencies

About

Metadata reader for image files.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •