Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e5ca2a835cd2fcb12ceeb92cf0365cf5 > files > 92

ocaml-camlimages-4.0.1-2.fc15.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="previous" href="Blend.html">
<link rel="next" href="Cmyk32.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Bitmap" rel="Chapter" href="Bitmap.html">
<link title="Blend" rel="Chapter" href="Blend.html">
<link title="Bmp" rel="Chapter" href="Bmp.html">
<link title="Cmyk32" rel="Chapter" href="Cmyk32.html">
<link title="Color" rel="Chapter" href="Color.html">
<link title="Freetype" rel="Chapter" href="Freetype.html">
<link title="Ftlow" rel="Chapter" href="Ftlow.html">
<link title="Fttext" rel="Chapter" href="Fttext.html">
<link title="Genimage" rel="Chapter" href="Genimage.html">
<link title="Gif" rel="Chapter" href="Gif.html">
<link title="Graphic_image" rel="Chapter" href="Graphic_image.html">
<link title="Images" rel="Chapter" href="Images.html">
<link title="Index16" rel="Chapter" href="Index16.html">
<link title="Index8" rel="Chapter" href="Index8.html">
<link title="Info" rel="Chapter" href="Info.html">
<link title="Jis_unicode" rel="Chapter" href="Jis_unicode.html">
<link title="Jpeg" rel="Chapter" href="Jpeg.html">
<link title="Mstring" rel="Chapter" href="Mstring.html">
<link title="OColor" rel="Chapter" href="OColor.html">
<link title="OImage" rel="Chapter" href="OImage.html">
<link title="OImages" rel="Chapter" href="OImages.html">
<link title="OXimage2" rel="Chapter" href="OXimage2.html">
<link title="OXvthumb" rel="Chapter" href="OXvthumb.html">
<link title="Png" rel="Chapter" href="Png.html">
<link title="Ppm" rel="Chapter" href="Ppm.html">
<link title="Ps" rel="Chapter" href="Ps.html">
<link title="Reduce" rel="Chapter" href="Reduce.html">
<link title="Region" rel="Chapter" href="Region.html">
<link title="Rgb24" rel="Chapter" href="Rgb24.html">
<link title="Rgba32" rel="Chapter" href="Rgba32.html">
<link title="Tmpfile" rel="Chapter" href="Tmpfile.html">
<link title="Ximage2" rel="Chapter" href="Ximage2.html">
<link title="Xpm" rel="Chapter" href="Xpm.html">
<link title="Xvthumb" rel="Chapter" href="Xvthumb.html"><title>Bmp</title>
</head>
<body>
<div class="navbar"><a href="Blend.html">Previous</a>
&nbsp;<a href="index.html">Up</a>
&nbsp;<a href="Cmyk32.html">Next</a>
</div>
<center><h1>Module <a href="type_Bmp.html">Bmp</a></h1></center>
<br>
<pre><span class="keyword">module</span> Bmp: <code class="code">sig</code> <a href="Bmp.html">..</a> <code class="code">end</code></pre>Checks the file header<br>
<hr width="100%">
<pre><span class="keyword">val</span> <a name="VALcheck_header"></a>check_header : <code class="type">string -> <a href="Images.html#TYPEheader">Images.header</a></code></pre><div class="info">
Checks the file header<br>
</div>
<pre><span class="keyword">val</span> <a name="VALload"></a>load : <code class="type">string -> <a href="Images.html#TYPEload_option">Images.load_option</a> list -> <a href="Images.html#TYPEt">Images.t</a></code></pre><div class="info">
Loads a bmp image.<br>
</div>
<pre><span class="keyword">val</span> <a name="VALsave"></a>save : <code class="type">string -> <a href="Images.html#TYPEsave_option">Images.save_option</a> list -> <a href="Images.html#TYPEt">Images.t</a> -> unit</code></pre><div class="info">
Save an image in bmp format file.<br>
</div>
<br>
The type of bmp images.<br>
<br><code><span class="keyword">type</span> <a name="TYPEbmp"></a><code class="type"></code>bmp = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bmpFileHeader&nbsp;: <code class="type"><a href="Bmp.html#TYPEbitmapfileheader">bitmapfileheader</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;0  14&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bmpInfoHeader&nbsp;: <code class="type"><a href="Bmp.html#TYPEbitmapinfoheader">bitmapinfoheader</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;14 54&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bmpRgbQuad&nbsp;: <code class="type"><a href="Images.html#TYPErgb">Images.rgb</a> array</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;54 ...</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bmpBytes&nbsp;: <code class="type">string</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;bfOffBits ...</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}

<div class="info">
The Caml representation of a bmp bit map image.
  Fields are Caml values, the decoded versions of raw data in the file.
<p>

  Structure of bitmaps files on disk :<ul>
<li>BITMAPFILEHEADER    : bytes 0 to 14 excluded</li>
<li>BITMAPINFOHEADER    : bytes 14 to 54 excluded</li>
<li>RGBQUAD []          : color map</li>
<li>BYTES []            : bit map</li>
</ul>
<br>
</div>

<br><code><span class="keyword">type</span> <a name="TYPEbitmapfileheader"></a><code class="type"></code>bitmapfileheader = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bfType&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;0   2&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bfSize&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;2   6&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bfReserved1&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;6   8&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bfReserved2&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;8  10&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>bfOffBits&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;10 14&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}


<br><code><span class="keyword">type</span> <a name="TYPEbitmapinfoheader"></a><code class="type"></code>bitmapinfoheader = {</code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biSize&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;14 18&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biWidth&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;18 22&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biHeight&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;22 26&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biPlanes&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;26 28&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biBitCount&nbsp;: <code class="type"><a href="Bmp.html#TYPEbibitcount">bibitcount</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;28 30&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biCompression&nbsp;: <code class="type"><a href="Bmp.html#TYPEbicompression">bicompression</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;30 34&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biSizeImage&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;34 38&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biXPelsPerMeter&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;38 42&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biYPelsPerMeter&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;42 46&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biClrUsed&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;46 50&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code>biClrImportant&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Bytes &lt;50 54&lt;</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}


<br><code><span class="keyword">type</span> <a name="TYPEbicompression"></a><code class="type"></code>bicompression = </code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">BI_RGB</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Specifies that the bitmap is not compressed.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">BI_RLE8</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Specifies a run-length encoded format for bitmaps with 8 bits
       per pixel. The compression format is a two-bytes format
       consisting of a count byte followed by a byte containing a color
       index.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">BI_RLE4</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >Specifies a run-length encoded format for bitmaps with 4 bits
       per pixel. The compression format is a two-byte format consisting of
       a count byte followed by two word-length color indexes.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>


<br><code><span class="keyword">type</span> <a name="TYPEbibitcount"></a><code class="type"></code>bibitcount = </code><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">Monochrome</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >1 The bitmap is monochrome, and the bmiColors field must 
          contain two entries. Each bit in the bitmap array represents a 
          pixel. If the bit is clear, the pixel is displayed with the
          color of the first entry in the bmiColors table; if the bit is
          set, the pixel has the color of the second entry in the
          table.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">Color16</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >4 The bitmap has a maximum of 16 colors, and the bmiColors 
          field contains up to 16 entries. Each pixel in the bitmap is 
          represented by a four-bit index into the color table.
          For example, if the first byte in the bitmap is 0x1F,  then the 
          byte represents two pixels. The first pixel contains the color 
          in the second table entry, and the second pixel contains the 
          color in the 16th table entry.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">Color256</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >8 The bitmap has a maximum of 256 colors, and the bmiColors 
          field contains up to 256 entries. In this case, each byte in the 
          array represents a single pixel.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span class="constructor">ColorM</span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" >24 The bitmap has a maximum of 2^24 colors. The bmiColors 
          field is NULL, and each three bytes in the bitmap array 
          represents the relative intensities of red, green, and blue, 
          respectively, of a pixel.</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>


<pre><span class="keyword">val</span> <a name="VALload_bmp"></a>load_bmp : <code class="type">string -> <a href="Bmp.html#TYPEbmp">bmp</a></code></pre><pre><span class="keyword">val</span> <a name="VALsave_bmp"></a>save_bmp : <code class="type">string -> <a href="Bmp.html#TYPEbmp">bmp</a> -> unit</code></pre><div class="info">
Load and save fnctions for BMP images.<br>
</div>
</body></html>