Closed tjamet closed 5 years ago
I have changed the implementation so that the interface is kept, and added a test to actually ensure that, after Decode
, the Raw
field has a valid tiff structure
Thanks! I'll try and take a look sometime this week.
Implement a lazy tiff loader
When using tiff files like raw files, the time required to load the whole file is significant. We do not load the whole picture frame in-memory in order to access EXIF values. We do not even need to load all EXIF values when we need to access a single EXIF field.
To improve the tiff loading speed, opportunistically read from the source file when needed.
This is a significant change in the interface as it requires to pass a ReaderAt instead of a Reader.
In order not to break backward compatibility, a LazyDecode function has been implemented to keep the same interface for the Decode one, including filling every Tag.
There are 2 places where the backward compatibility is broken:
Benchmark results (on SSD):
EXIF parsing
Before update, the benchmark results for exif parsing were:
TIFF decoding