A YZiForm 0.0.0a follows some fairly simple rules
Every YZiForm 0.0.0a file starts with the line: <Begin YZiForm Image Version 0.0.0a>. Future versions will have different version numbers but all versions will have the <Begin YZiForm Image Version #> tag to indicate the beginning of the YZiForm image. Don't forget the line break.
The definitions sections begins with the line <Definitions> to indicate the beginning of the section. In version 0.0.0a this tag serves no useful purpose except to indicate the beginning of the definitions section. Again, don't forget the line break.
Beneath the definitions tag lie the definitions. Each definition is specified by label. Labels can be one of the characters between 1 and z in the ASCII table or a string of such characters except for the + sign. If a label is a string, it must be denoted as string by quotation marks (ex: "black"). After the label there is a space, an equals sign (=) and another space. Following that space are the 16 bit R,G and B values comma delimited without spaces. The line break indicates the end of a defintion. A definition may not be longer than 127 characters.
1 = 23678, 65535, 0
"mycolor" = 8971, 21879, 48789
The image section of the file starts with the tag <Image (width), (height)>. In addition to specifying the width and height of the image, this tag also indicates the end of the definitions section of the file. As usual, a line break must be placed after the tag.
Following the tag, the image begins. The image simply consists of a series of labels placed next to eachother. String labels must be in quotes as there are no delimiters between labels. Line breaks are used to indicate the end of each row of the image. The + character also represents a single pixel and is used to indicate transparency (IE: nothing is drawn where a + character is placed). Please remember that the total number of rows (lines) must be equal to the image's height and the total number of columns (labels per row) must be equal to the image's width. All implementations should be wary of this potential problem.
All YZiForm 0.0.0a images must end with the tag <End Image> without a following line break if at the end of a file. Please note that a datafile of multiple image files can be created with one image directly after the next as is done in YZChess.
<Begin YZiForm Image Version 0.0.0a> <Definitions> W = 65535,65535,0 B = 0,0,42000 "Color1" = 30000,20000,10000 <Image 14,20> BBBBBBBBBBBBBB BWWWWWBBWWWWWB BWWWWWBBWWWWWB BWWWWWBBWWWWWB BWWWWWBBWWWWWB BWWWWWBBWWWWWB BWWWWWBBWWWWWB BWWWWWBBWWWWWB BWWWWWBBWWWWWB BBBBBBBBBBBBBB BBBBBBBBBBBBBB BWWWWWBBWWWWWB BWWWWWBBWWWWWB BWWWWWBBWWWWW"Color1" BWWWWWBBWWWWW"Color1" BWWWWWBBWWWWW"Color1" BWWWWWBBWWWWW"Color1" BWWWWWBBWWWWW"Color1" BWWWWWBBWWWWW"Color1" BBBBBBBBBBBBB"Color1" <End Image>