-
Notifications
You must be signed in to change notification settings - Fork 14
/
bitmap.grammar
54 lines (54 loc) · 3.23 KB
/
bitmap.grammar
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?xml version="1.0" encoding="UTF-8"?>
<ufwb version="1.23.4">
<grammar name="Windows Bitmaps" start="id:2" author="Andreas Pehnack" fileextension="bmp" uti="com.microsoft.bmp">
<description>Grammar for the Windows Bitmap file format</description>
<structure name="Defaults" id="3" encoding="ISO_8859-1:1987" endian="little" signed="no"/>
<structure name="Bitmap File" id="2" extends="id:3">
<structref name="Header" id="6" fillcolor="00F900" structure="id:5"/>
<structref name="BITMAPINFOHEADER" id="8" fillcolor="FF9200" structure="id:7"/>
<structref name="ColorPallete" id="33" structure="id:28"/>
</structure>
<structure name="Header" id="5" extends="id:3">
<number name="bfType" mustmatch="yes" id="10" type="integer" length="2" endian="big" display="hex">
<fixedvalues>
<fixedvalue value="0x424D"/>
</fixedvalues>
</number>
<number name="bfSize" id="11" type="integer" length="4"/>
<number name="bfReserved" id="12" type="integer" length="4">
<fixedvalues>
<fixedvalue value="0"/>
</fixedvalues>
</number>
<offset name="bfOffBits" id="14" length="4" references="id:13" follownullreference="yes"/>
</structure>
<structure name="BITMAPINFOHEADER" id="7" length="this.biSize" extends="id:3" fillcolor="929292">
<number name="biSize" id="16" fillcolor="FF2600" type="integer" length="4">
<fixedvalues>
<fixedvalue value="40"/>
<fixedvalue name="<unnamed>" value="108"/>
</fixedvalues>
</number>
<number name="biWidth" id="17" fillcolor="FEFB00" type="integer" length="4"/>
<number name="biHeight" id="18" fillcolor="FEFB00" type="integer" length="4" signed="yes"/>
<number name="biPlanes" id="19" fillcolor="797979" type="integer" length="2">
<fixedvalues>
<fixedvalue value="1"/>
</fixedvalues>
</number>
<number name="biBitCount" id="20" fillcolor="FF89D8" type="integer" length="2"/>
<number name="biCompression" id="21" fillcolor="72FA78" type="integer" length="4"/>
<number name="biSizeImage" id="22" fillcolor="FFD478" type="integer" length="4"/>
<number name="biXPelsPerMeter" id="23" type="integer" length="4"/>
<number name="biYPelsPerMeter" id="24" fillcolor="C0C0C0" type="integer" length="4"/>
<number name="biClrUsed" id="25" fillcolor="73FDFF" type="integer" length="4"/>
<number name="biClrImportant" id="26" fillcolor="7980FF" type="integer" length="4"/>
</structure>
<structure name="ColorPallete" id="28" extends="id:3" encoding="ISO_8859-1:1987" endian="little" signed="no">
<binary name="RBGPallet" id="29" fillcolor="D783FF" repeatmin="0" repeatmax="biClrUsed" length="32" lengthunit="bit"/>
</structure>
<structure name="ImageData" id="13" extends="id:3">
<binary name="ImageData" id="31" fillcolor="D5D5D5" length="remaining"/>
</structure>
</grammar>
</ufwb>