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, 2017, 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 <h1>BMP Metadata Format Specification</h1>


  34 
  35 The XML schema for the native image metadata format is as follows:
  36 
  37 <pre>
  38 &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  39 
  40 &lt;!-- Schema for BMP native image metadata format. --&gt;
  41 
  42 &lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  43             xmlns="http://javax.imageio.plugins"
  44             targetNamespace="http://javax.imageio.plugins"&gt;
  45 
  46   &lt;!-- Coordinates of a point in the CIE XYZ color space. --&gt;
  47   &lt;xsd:complexType name="XYZPoint"&gt;
  48     &lt;xsd:sequence&gt;
  49       &lt;xsd:element name="X" type="xsd:double"/&gt;
  50       &lt;xsd:element name="Y" type="xsd:double"/&gt;
  51       &lt;xsd:element name="Z" type="xsd:double"/&gt;
  52     &lt;/xsd:sequence&gt;
  53   &lt;/xsd:complexType&gt;
  54 
  55   &lt;!-- BMP Schema 1.0 root element. --&gt;
  56   &lt;xsd:element name="javax_imageio_bmp_1.0"&gt;
  57     &lt;xsd:complexType&gt;
  58       &lt;xsd:sequence&gt;
  59 
  60         &lt;!-- BMP version string --&gt;
  61         &lt;xsd:element name="BMPVersion" type="xsd:string"/&gt;
  62 
  63         &lt;!-- Bitmap width --&gt;
  64         &lt;xsd:element name="Width" type="xsd:unsignedInt"/&gt;
  65 
  66         &lt;!-- Bitmap height --&gt;
  67         &lt;xsd:element name="Height" type="xsd:unsignedInt"/&gt;
  68 
  69         &lt;!-- Number of bits per pixel --&gt;
  70         &lt;xsd:element name="BitsPerPixel" type="xsd:unsignedShort"/&gt;
  71 
  72         &lt;!-- Compression type --&gt;
  73         &lt;xsd:element name="Compression" type="xsd:unsignedInt" minOccurs="0"/&gt;
  74 
  75         &lt;!-- Image size in bytes --&gt;
  76         &lt;xsd:element name="ImageSize" type="xsd:unsignedInt" minOccurs="0"/&gt;
  77 
  78         &lt;!-- Resolution in pixels per unit distance --&gt;
  79         &lt;xsd:element name="PixelsPerMeter" minOccurs="0"&gt;
  80           &lt;xsd:complexType&gt;
  81             &lt;xsd:sequence&gt;
  82               &lt;xsd:element name="X" type="xsd:unsignedInt"/&gt;
  83               &lt;xsd:element name="Y" type="xsd:unsignedInt"/&gt;
  84             &lt;/xsd:sequence&gt;
  85           &lt;/xsd:complexType&gt;
  86         &lt;/xsd:element&gt; &lt;!-- PixelsPerMeter --&gt;
  87 
  88 
  89         &lt;!-- Number of color indexes in the color table actually used --&gt;
  90         &lt;xsd:element name="ColorsUsed" type="xsd:unsignedInt" minOccurs="0"/&gt;
  91 
  92         &lt;!-- Number of color indexes considered important for display --&gt;
  93         &lt;xsd:element name="ColorsImportant" type="xsd:unsignedInt"
  94                      minOccurs="0"/&gt;
  95 
  96         &lt;!-- Color masks; present for BI_BITFIELDS compression only --&gt;
  97         &lt;xsd:element name="Mask" minOccurs="0"&gt;
  98           &lt;xsd:complexType&gt;
  99             &lt;xsd:sequence&gt;
 100               &lt;xsd:element name="Red" type="xsd:unsignedInt"/&gt;
 101               &lt;xsd:element name="Green" type="xsd:unsignedInt"/&gt;
 102               &lt;xsd:element name="Blue" type="xsd:unsignedInt"/&gt;
 103               &lt;xsd:element name="Alpha" type="xsd:unsignedInt" minOccurs="0"/&gt;
 104             &lt;/xsd:sequence&gt;
 105           &lt;/xsd:complexType&gt;
 106         &lt;/xsd:element&gt;
 107 
 108         &lt;!-- Color space  --&gt;
 109         &lt;xsd:element name="ColorSpaceType" type="xsd:unsignedInt"
 110                      minOccurs="0"/&gt;
 111 
 112         &lt;!-- CIE XYZ for the LCS_CALIBRATED_RGB color space --&gt;
 113         &lt;xsd:element name="CIEXYZEndpoints" minOccurs="0"&gt;
 114           &lt;xsd:complexType&gt;
 115             &lt;xsd:sequence&gt;
 116               &lt;xsd:element name="Red" type="XYZPoint"/&gt;
 117               &lt;xsd:element name="Green" type="XYZPoint"/&gt;
 118               &lt;xsd:element name="Blue" type="XYZPoint"/&gt;
 119             &lt;/xsd:sequence&gt;
 120           &lt;/xsd:complexType&gt;
 121         &lt;/xsd:element&gt;
 122 
 123         &lt;!-- Gamma values for the LCS_CALIBRATED_RGB color space --&gt;
 124         &lt;xsd:element name="Gamma" minOccurs="0"&gt;
 125           &lt;xsd:complexType&gt;
 126             &lt;xsd:sequence&gt;
 127               &lt;xsd:element name="Red" type="xsd:unsignedInt"/&gt;
 128               &lt;xsd:element name="Green" type="xsd:unsignedInt"/&gt;
 129               &lt;xsd:element name="Blue" type="xsd:unsignedInt"/&gt;
 130             &lt;/xsd:sequence&gt;
 131           &lt;/xsd:complexType&gt;
 132         &lt;/xsd:element&gt;
 133 
 134         &lt;!-- Rendering intent --&gt;
 135         &lt;xsd:element name="Intent" type="xsd:unsignedInt" minOccurs="0"/&gt;
 136 
 137         &lt;!-- The image colormap --&gt;
 138         &lt;xsd:element name="Palette" minOccurs="0"&gt;
 139           &lt;xsd:complexType&gt;
 140             &lt;xsd:sequence&gt;
 141               &lt;xsd:element name="PaletteEntry"&gt;
 142                 &lt;xsd:complexType&gt;
 143                   &lt;xsd:sequence&gt;
 144                     &lt;xsd:element name="Red" type="xsd:unsignedByte"/&gt;
 145                     &lt;xsd:element name="Green" type="xsd:unsignedByte"/&gt;
 146                     &lt;xsd:element name="Blue" type="xsd:unsignedByte"/&gt;
 147                     &lt;xsd:element name="Alpha" type="xsd:unsignedByte" minOccurs="0"/&gt;
 148                   &lt;/xsd:sequence&gt;
 149                 &lt;/xsd:complexType&gt;
 150               &lt;/xsd:element&gt;
 151             &lt;/xsd:sequence&gt;
 152           &lt;/xsd:complexType&gt;
 153         &lt;/xsd:element&gt;
 154 
 155       &lt;/xsd:sequence&gt;
 156     &lt;/xsd:complexType&gt;
 157   &lt;/xsd:element&gt; &lt;!-- bmp_image_1.0 --&gt;
 158 
 159 &lt;/xsd:schema&gt;
 160 </pre>
 161 
 162 @since 1.5
 163 
 164 </body>
--- EOF ---