exif_parser v0.2.4 ExifParser.ImageFileDirectory View Source

Tiff Image File Directory parser. Parses the IFD that provides the number of tags in the IFD and offset from the start of the file buffer.

Struct

num_entries

The length of the IFD desciptor helps in parsing the IFD. This can be used to find the end of the IFD.

tag_lists

This holds the map of tags. The keys in the map are tag_names and the values are tag_values.

offset

This represents the non-neg-integer that gives the number of bytes offset from the start of tiff buffer.

Link to this section Summary

Functions

This method parses the ifds that are reachable, given the endianess, tiff_buffer, and the offset

The IFDs are parsed from the tiff buffer. The map keys for the IFDs are updated and prettified if passed as argument

Link to this section Types

Link to this type t() View Source
t() :: %ExifParser.ImageFileDirectory{
  num_entries: non_neg_integer(),
  offset: non_neg_integer(),
  tag_lists: map()
}

Link to this section Functions

Link to this function parse_ifds(endian, start_of_tiff, offset, tag_type) View Source
parse_ifds(
  endian :: :little | :big,
  start_of_tiff :: binary(),
  offset :: non_neg_integer(),
  tag_type :: ExifParser.Tag.LookUp.tag_type()
) :: [ExifParser.ImageFileDirectory]

This method parses the ifds that are reachable, given the endianess, tiff_buffer, and the offset.

The IFD are first found and the tags in each of them parsed.

Link to this function parse_tiff_body(endian, start_of_tiff, offset, prettify \\ true) View Source
parse_tiff_body(
  endian :: :little | :big,
  start_of_tiff :: binary(),
  offset :: non_neg_integer(),
  prettify :: Boolean
) :: %{atom: ExifParser.ImageFileDirectory}

The IFDs are parsed from the tiff buffer. The map keys for the IFDs are updated and prettified if passed as argument.

The output is made pretty by default.