exif_parser v0.2.4 ExifParser.Tag View Source
Tiff Tag parser. Parses the 12 bytes that represent the information contained in the TIFF tags.
tag_id | 2 bytes |
type_id | 2 bytes |
tag_count | 4 bytes |
tag_vaue | 4 bytes |
The tag_id if referenced in the lookup table and tag_name field is updated with a more human readable atom value.
The value is updated to the decoded value according to the data type.
Link to this section Summary
Functions
The method parses the a binary buffer that contains a tag
Link to this section Types
Link to this type
t()
View Source
t() :: %ExifParser.Tag{ data_count: non_neg_integer(), data_type: Value.data_types(), tag_id: non_neg_integer(), tag_name: atom(), value: any() }
Link to this section Functions
Link to this function
parse(tag_buffer, header, start_of_tiff, tag_type \\ :tiff)
View Source
parse( tag_buffer :: binary(), endian :: :little | :big, start_of_tiff :: non_neg_integer(), tag_type :: ExifParser.Tag.LookUp.tag_type() ) :: {:ok, ExifParser.Tag} | {:error, String.t()}
The method parses the a binary buffer that contains a tag.
- The tag_id, type_id and tag_count are decode by converting binary to integer.
- The tag_id and tag_type is used to look up the tag_name.
- The value of the tag is decoded using the type_id and tag_cousing the tag_type and tag_count.
The tag_type is set to :tiff by default.
The result can be either a {:ok, Tag} or {:error, String}