1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"/> 5 <title>BMP Metadata Format Specification</title> 6 </head> 7 <!-- 8 Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved. 9 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 10 11 This code is free software; you can redistribute it and/or modify it 12 under the terms of the GNU General Public License version 2 only, as 13 published by the Free Software Foundation. Oracle designates this 14 particular file as subject to the "Classpath" exception as provided 15 by Oracle in the LICENSE file that accompanied this code. 16 17 This code is distributed in the hope that it will be useful, but WITHOUT 18 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 19 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 20 version 2 for more details (a copy is included in the LICENSE file that 21 accompanied this code). 22 23 You should have received a copy of the GNU General Public License version 24 2 along with this work; if not, write to the Free Software Foundation, 25 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 26 27 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 28 or visit www.oracle.com if you need additional information or have any 29 questions. 30 --> 31 32 <body> 33 <main role="main"> 34 <div class="contentContainer"> 35 <h1>BMP Metadata Format Specification</h1> 36 37 The XML schema for the native image metadata format is as follows: 38 39 <pre> 40 <?xml version="1.0" encoding="UTF-8"?> 41 42 <!-- Schema for BMP native image metadata format. --> 43 44 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 45 xmlns="http://javax.imageio.plugins" 46 targetNamespace="http://javax.imageio.plugins"> 47 48 <!-- Coordinates of a point in the CIE XYZ color space. --> 49 <xsd:complexType name="XYZPoint"> 50 <xsd:sequence> 51 <xsd:element name="X" type="xsd:double"/> 52 <xsd:element name="Y" type="xsd:double"/> 53 <xsd:element name="Z" type="xsd:double"/> 54 </xsd:sequence> 55 </xsd:complexType> 56 57 <!-- BMP Schema 1.0 root element. --> 58 <xsd:element name="javax_imageio_bmp_1.0"> 59 <xsd:complexType> 60 <xsd:sequence> 61 62 <!-- BMP version string --> 63 <xsd:element name="BMPVersion" type="xsd:string"/> 64 65 <!-- Bitmap width --> 66 <xsd:element name="Width" type="xsd:unsignedInt"/> 67 68 <!-- Bitmap height --> 69 <xsd:element name="Height" type="xsd:unsignedInt"/> 70 71 <!-- Number of bits per pixel --> 72 <xsd:element name="BitsPerPixel" type="xsd:unsignedShort"/> 73 74 <!-- Compression type --> 75 <xsd:element name="Compression" type="xsd:unsignedInt" minOccurs="0"/> 76 77 <!-- Image size in bytes --> 78 <xsd:element name="ImageSize" type="xsd:unsignedInt" minOccurs="0"/> 79 80 <!-- Resolution in pixels per unit distance --> 81 <xsd:element name="PixelsPerMeter" minOccurs="0"> 82 <xsd:complexType> 83 <xsd:sequence> 84 <xsd:element name="X" type="xsd:unsignedInt"/> 85 <xsd:element name="Y" type="xsd:unsignedInt"/> 86 </xsd:sequence> 87 </xsd:complexType> 88 </xsd:element> <!-- PixelsPerMeter --> 89 90 91 <!-- Number of color indexes in the color table actually used --> 92 <xsd:element name="ColorsUsed" type="xsd:unsignedInt" minOccurs="0"/> 93 94 <!-- Number of color indexes considered important for display --> 95 <xsd:element name="ColorsImportant" type="xsd:unsignedInt" 96 minOccurs="0"/> 97 98 <!-- Color masks; present for BI_BITFIELDS compression only --> 99 <xsd:element name="Mask" minOccurs="0"> 100 <xsd:complexType> 101 <xsd:sequence> 102 <xsd:element name="Red" type="xsd:unsignedInt"/> 103 <xsd:element name="Green" type="xsd:unsignedInt"/> 104 <xsd:element name="Blue" type="xsd:unsignedInt"/> 105 <xsd:element name="Alpha" type="xsd:unsignedInt" minOccurs="0"/> 106 </xsd:sequence> 107 </xsd:complexType> 108 </xsd:element> 109 110 <!-- Color space --> 111 <xsd:element name="ColorSpaceType" type="xsd:unsignedInt" 112 minOccurs="0"/> 113 114 <!-- CIE XYZ for the LCS_CALIBRATED_RGB color space --> 115 <xsd:element name="CIEXYZEndpoints" minOccurs="0"> 116 <xsd:complexType> 117 <xsd:sequence> 118 <xsd:element name="Red" type="XYZPoint"/> 119 <xsd:element name="Green" type="XYZPoint"/> 120 <xsd:element name="Blue" type="XYZPoint"/> 121 </xsd:sequence> 122 </xsd:complexType> 123 </xsd:element> 124 125 <!-- Gamma values for the LCS_CALIBRATED_RGB color space --> 126 <xsd:element name="Gamma" minOccurs="0"> 127 <xsd:complexType> 128 <xsd:sequence> 129 <xsd:element name="Red" type="xsd:unsignedInt"/> 130 <xsd:element name="Green" type="xsd:unsignedInt"/> 131 <xsd:element name="Blue" type="xsd:unsignedInt"/> 132 </xsd:sequence> 133 </xsd:complexType> 134 </xsd:element> 135 136 <!-- Rendering intent --> 137 <xsd:element name="Intent" type="xsd:unsignedInt" minOccurs="0"/> 138 139 <!-- The image colormap --> 140 <xsd:element name="Palette" minOccurs="0"> 141 <xsd:complexType> 142 <xsd:sequence> 143 <xsd:element name="PaletteEntry"> 144 <xsd:complexType> 145 <xsd:sequence> 146 <xsd:element name="Red" type="xsd:unsignedByte"/> 147 <xsd:element name="Green" type="xsd:unsignedByte"/> 148 <xsd:element name="Blue" type="xsd:unsignedByte"/> 149 <xsd:element name="Alpha" type="xsd:unsignedByte" minOccurs="0"/> 150 </xsd:sequence> 151 </xsd:complexType> 152 </xsd:element> 153 </xsd:sequence> 154 </xsd:complexType> 155 </xsd:element> 156 157 </xsd:sequence> 158 </xsd:complexType> 159 </xsd:element> <!-- bmp_image_1.0 --> 160 161 </xsd:schema> 162 </pre> 163 164 @since 1.5 165 </div> 166 </main> 167 </body>