exif: GraphViz block diagram (.dot) source

This page hosts a formal specification of exif using Kaitai Struct. This specification can be automatically translated into a variety of programming languages to get a parsing library.

GraphViz block diagram source

exif.dot

digraph {
	rankdir=LR;
	node [shape=plaintext];
	subgraph cluster__exif {
		label="Exif";
		graph[style=dotted];

		exif__seq [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
			<TR><TD BGCOLOR="#E0FFE0">pos</TD><TD BGCOLOR="#E0FFE0">size</TD><TD BGCOLOR="#E0FFE0">type</TD><TD BGCOLOR="#E0FFE0">id</TD></TR>
			<TR><TD PORT="endianness_pos">0</TD><TD PORT="endianness_size">2</TD><TD>u2le</TD><TD PORT="endianness_type">endianness</TD></TR>
			<TR><TD PORT="body_pos">2</TD><TD PORT="body_size">...</TD><TD>switch (endianness)</TD><TD PORT="body_type">body</TD></TR>
		</TABLE>>];
exif__seq_body_switch [label=<<TABLE BORDER="0" CELLBORDER="1" CELLSPACING="0">
	<TR><TD BGCOLOR="#F0F2E4">case</TD><TD BGCOLOR="#F0F2E4">type</TD></TR>
	<TR><TD>18761</TD><TD PORT="case0">ExifLe</TD></TR>
	<TR><TD>19789</TD><TD PORT="case1">ExifBe</TD></TR>
</TABLE>>];
	}
	exif__seq:body_type -> exif__seq_body_switch [style=bold];
	exif__seq_body_switch:case0 -> exif_le__seq [style=bold];
	exif__seq_body_switch:case1 -> exif_be__seq [style=bold];
	exif__seq:endianness_type -> exif__seq:body_type [color="#404040"];
}