<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>libkate: Format - bitmap</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.1 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li class="current"><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> </ul> </div> </div> <div class="contents"> <h1><a class="anchor" id="format_bitmap">Format - bitmap </a></h1><p>A bitmap definition consists of:</p> <ul> <li>a <a class="el" href="format_32v.html">variable length integer</a> representing the width of the bitmap in pixels. </li> <li>a <a class="el" href="format_32v.html">variable length integer</a> representing the height of the bitmap in pixels. </li> <li>8 bits representing the number of bits per pixel for this bitmap (values not in the 0-7 range are an error).</li> </ul> <p>Then, if the number of bits per pixel is zero:</p> <ul> <li>8 bits representing the type of the bitmap.</li> </ul> <p>For type 0 (paletted bitmap):</p> <ul> <li>8 bits for the encoding of this bitmap</li> </ul> <p>For encoding 1 (RLE encoding):</p> <ul> <li>a <a class="el" href="format_32v.html">variable length integer</a> for the number of bits per pixel. </li> <li>a <a class="el" href="format_32v.html">variable length integer</a> for the index of the default palette to use for this bitmap (-1 if none) </li> <li>a <a class="el" href="format_rle.html">RLE encoded bitmap</a>.</li> </ul> <p>All other encodings are reserved. If one is encountered, the bitmap cannot be decoded.</p> <p>For type 1 (PNG bitmap):</p> <ul> <li>32 bits for the number of bytes used for this bitmap's data. </li> <li>That number of bytes, interpreted as a raw PNG stream.</li> </ul> <p>All other types are reserved. If one is encountered, the bitmap cannot be decoded.</p> <p>If the number of bits per pixel is greater than zero (deprecated):</p> <ul> <li>a <a class="el" href="format_32v.html">variable length integer</a> representing the index of the default palette to use for this bitmap (-1 for no default palette). </li> <li>a stream of bits representing the pixel indices for this bitmap, rows first, packed (eg, N bits for the first pixel, N bits for the second one, etc, N being the number of bits per pixel specified above)</li> </ul> <p>Next, we have a <a class="el" href="format_warp.html">warp</a>.</p> <p>Bitstream version 0.4 starts making use of this warp: </p> <ul> <li>a <a class="el" href="format_32v.html">variable length integer</a> representing the horizontal offset to the logical center of the bitmap. </li> <li>a <a class="el" href="format_32v.html">variable length integer</a> representing the vertical offset to the logical center of the bitmap.</li> </ul> <p>Next, the data ends. </p> </div> <hr size="1"/><address style="text-align: right;"><small>Generated on Wed Dec 23 04:05:07 2009 for libkate by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> </body> </html>