aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/javax/imageio/metadata/doc-files/bmp_metadata.html
blob: d6bc0b998f3c95d93c15dae903c6f5f1778a1d45 (plain)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!--
Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.

This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.  Oracle designates this
particular file as subject to the "Classpath" exception as provided
by Oracle in the LICENSE file that accompanied this code.

This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).

You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
CA 95054 USA or visit www.sun.com if you need additional information or
have any questions.
-->

<title>BMP Metadata Format Specification</title>
</head>

<body>
<center><h1>
BMP Metadata Format Specification
</h1></center>

The XML schema for the native image metadata format is as follows:

<pre>
&lt;?xml version="1.0" encoding="UTF-8"?&gt;

&lt;!-- Schema for BMP native image metadata format. --&gt;

&lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns="http://javax.imageio.plugins"
            targetNamespace="http://javax.imageio.plugins"&gt;

  &lt;!-- Coordinates of a point in the CIE XYZ color space. --&gt;
  &lt;xsd:complexType name="XYZPoint"&gt;
    &lt;xsd:sequence&gt;
      &lt;xsd:element name="X" type="xsd:double"/&gt;
      &lt;xsd:element name="Y" type="xsd:double"/&gt;
      &lt;xsd:element name="Z" type="xsd:double"/&gt;
    &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;

  &lt;!-- BMP Schema 1.0 root element. --&gt;
  &lt;xsd:element name="javax_imageio_bmp_1.0"&gt;
    &lt;xsd:complexType&gt;
      &lt;xsd:sequence&gt;

        &lt;!-- BMP version string --&gt;
        &lt;xsd:element name="BMPVersion" type="xsd:string"/&gt;

        &lt;!-- Bitmap width --&gt;
        &lt;xsd:element name="Width" type="xsd:unsignedInt"/&gt;

        &lt;!-- Bitmap height --&gt;
        &lt;xsd:element name="Height" type="xsd:unsignedInt"/&gt;

        &lt;!-- Number of bits per pixel --&gt;
        &lt;xsd:element name="BitsPerPixel" type="xsd:unsignedShort"/&gt;

        &lt;!-- Compression type --&gt;
        &lt;xsd:element name="Compression" type="xsd:unsignedInt" minOccurs="0"/&gt;

        &lt;!-- Image size in bytes --&gt;
        &lt;xsd:element name="ImageSize" type="xsd:unsignedInt" minOccurs="0"/&gt;

	&lt;!-- Resolution in pixels per unit distance --&gt;
        &lt;xsd:element name="PixelsPerMeter" minOccurs="0"&gt;
	  &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="X" type="xsd:unsignedInt"/&gt;
              &lt;xsd:element name="Y" type="xsd:unsignedInt"/&gt;
            &lt;/xsd:sequence&gt;
	  &lt;/xsd:complexType&gt;
        &lt;/xsd:element&gt; &lt;!-- PixelsPerMeter --&gt;


	&lt;!-- Number of color indexes in the color table actually used --&gt;
        &lt;xsd:element name="ColorsUsed" type="xsd:unsignedInt" minOccurs="0"/&gt;

	&lt;!-- Number of color indexes considered important for display --&gt;
        &lt;xsd:element name="ColorsImportant" type="xsd:unsignedInt"
		     minOccurs="0"/&gt;

	&lt;!-- Color masks; present for BI_BITFIELDS compression only --&gt;
        &lt;xsd:element name="Mask" minOccurs="0"&gt;
	  &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="Red" type="xsd:unsignedInt"/&gt;
              &lt;xsd:element name="Green" type="xsd:unsignedInt"/&gt;
              &lt;xsd:element name="Blue" type="xsd:unsignedInt"/&gt;
              &lt;xsd:element name="Alpha" type="xsd:unsignedInt" minOccurs="0"/&gt;
            &lt;/xsd:sequence&gt;
	  &lt;/xsd:complexType&gt;
	&lt;/xsd:element&gt;

        &lt;!-- Color space  --&gt;
        &lt;xsd:element name="ColorSpaceType" type="xsd:unsignedInt" 
		     minOccurs="0"/&gt;

	&lt;!-- CIE XYZ for the LCS_CALIBRATED_RGB color space --&gt;
        &lt;xsd:element name="CIEXYZEndpoints" minOccurs="0"&gt;
	  &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="Red" type="XYZPoint"/&gt;
              &lt;xsd:element name="Green" type="XYZPoint"/&gt;
              &lt;xsd:element name="Blue" type="XYZPoint"/&gt;
            &lt;/xsd:sequence&gt;
	  &lt;/xsd:complexType&gt;
        &lt;/xsd:element&gt;

	&lt;!-- Gamma values for the LCS_CALIBRATED_RGB color space --&gt;
        &lt;xsd:element name="Gamma" minOccurs="0"&gt;
	  &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="Red" type="xsd:unsignedInt"/&gt;
              &lt;xsd:element name="Green" type="xsd:unsignedInt"/&gt;
              &lt;xsd:element name="Blue" type="xsd:unsignedInt"/&gt;
            &lt;/xsd:sequence&gt;
	  &lt;/xsd:complexType&gt;
	&lt;/xsd:element&gt;

	&lt;!-- Rendering intent --&gt;
        &lt;xsd:element name="Intent" type="xsd:unsignedInt" minOccurs="0"/&gt;

	&lt;!-- The image colormap --&gt;
        &lt;xsd:element name="Palette" minOccurs="0"&gt;
	  &lt;xsd:complexType&gt;
            &lt;xsd:sequence&gt;
              &lt;xsd:element name="PaletteEntry"&gt;
	        &lt;xsd:complexType&gt;
                  &lt;xsd:sequence&gt;
                    &lt;xsd:element name="Red" type="xsd:unsignedByte"/&gt;
                    &lt;xsd:element name="Green" type="xsd:unsignedByte"/&gt;
                    &lt;xsd:element name="Blue" type="xsd:unsignedByte"/&gt;
                    &lt;xsd:element name="Alpha" type="xsd:unsignedByte" minOccurs="0"/&gt;
                  &lt;/xsd:sequence&gt;
	        &lt;/xsd:complexType&gt;
              &lt;/xsd:element&gt;
            &lt;/xsd:sequence&gt;
	  &lt;/xsd:complexType&gt;
	&lt;/xsd:element&gt;

      &lt;/xsd:sequence&gt;
    &lt;/xsd:complexType&gt;
  &lt;/xsd:element&gt; &lt;!-- bmp_image_1.0 --&gt;

&lt;/xsd:schema&gt;
</pre>

@since 1.5

</body>