Open davidhicks opened 7 years ago
This format is the basis for more commonly known formats JFIF and EXIF.
It would probably be best if #156 were addressed before development of this JIF .ksy specification continues. In the JIF format, a multi-byte code is used to denote the start of a type of section of the file format. Whilst it may be possible to write a .ksy specification that handles this, the result will be quite complex, hard to understand and ugly to read. It would be better if either #156 was available, or a new feature like optional: true
were available to perform a look-ahead read on the stream to see what data type is required to be used to interpret the next bytes in the stream. See #167 for another example of where optional: true
could be useful.
We also need to think about how JFIF and EXIF could extend or otherwise use the types defined in this base JIF format, avoiding duplication as much as possible.
Documentation on the file format: https://www.w3.org/Graphics/JPEG/itu-t81.pdf
Branch containing draft specification: https://github.com/davidhicks/kaitai_struct_formats/tree/jif
Sample/test files: https://www.itu.int/net/itu-t/sigdb/speimage/ImageForm-s.aspx?val=1010083