Skip to content
This repository was archived by the owner on Sep 8, 2021. It is now read-only.
This repository was archived by the owner on Sep 8, 2021. It is now read-only.

Implementing Exif Parsing #1

Description

@niclashoyer

Hi,

I started to write some basic Exif parsing for JPEGs based on this description.

Basically Exif is encoded TIFF inside the APP1 payload. Unfortunately the format is quite messy. One problem that bothers me is, that for each Exif tag the value is stored at an offset if it is larger than 4 bytes. This offset is relative to the start of the TIFF header (APP1 starting point + fixed offset).

I see two strategies here:

  1. store all references to data and proceed until all tags are read. Then read all references (as they are usually stored directly after the IFD). This would involve sorting the references, because they can be in any order and we need to read them in order.
  2. read all references directly after reading the reference, this involves seeking, thus the LoadableMetadata::load method needs Seek. But that gives an error for load_from_buf as Seek is not implemented for &[u8].

I prefer the second method, because it would make parsing a lot easier and doesn't need any sorting on references, but I don't know if it is possible to fix load_from_buf to be compatible.

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions