-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ghost header or; data outside IFDs and Images #99
Comments
I found a really interesting explanation of the optimization with the ghost header here -> https://lists.osgeo.org/pipermail/gdal-dev/2019-May/050169.html |
That seems to be the root cause. Being able to store an IFD with its offset and then jump back to it (respectively to the start of the image) seems to solve a few lot of related problems in one single operation. It shouldn't even be expensive in terms of interface as the decoder already requires
|
I'm not even sure why |
Yes i don't think init need to be public as it's already called in new 😉 |
At least two formats, GeoTIFF and ScanImage, use a similar technique to include additional data in tiff's without affecting the structure of the file for conformant, pure image readers. The usual process when reading the first frame is like so:
Note that, by adjusting all offsets accordingly, it is possible to 'hide' data inside the file in the sense that conformant image decoders will simply seek over the data. In particular by choosing an initial offset greater than 8 resp. 16 some number of bytes immediately after the tiff header will be skipped. This is referred to as a Ghost Header in GeoTIFF and used to provide additional data for 'Cloud compatibility', i.e. it contains a separate index that can be used to optimize reads by transferring less of the whole file which would otherwise be a single linked list in the form of IFDs. (See also #85).
It seems interesting to provide access to this data in
tiff
in a way that is agnostic of the usage in the variants of thetiff
format and in such a way that it is purely opt-in. The main questions are:new
.The text was updated successfully, but these errors were encountered: