⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bmp.html

📁 刚刚看到本站有Visual C++数字图象处理(人民邮电出版社)的电子书
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<html>



<head>

<meta http-equiv="content-type" content="text/html; charset=gb_2312-80">

<meta name="generator" content="microsoft frontpage 3.0">

<title>bmp format</title>

<meta name="subject" content="windows bitmap file format specifications">

<meta name="major version" content="1">

<meta name="minor version" content="0">

<meta name="template" content="c:\msoffice\templates\c3word60.dot">

</head>



<body background="../jpg/di1.JPG">



<p align="center"><font face="book antiqua" size="6" color="#0000ff">bmp format</font></p>

<div align="center"><center>



<table border="0" width="88%">

  <tr>

    <td width="100%"><b><p align="justify"><font face="book antiqua" size="6">table of 

    contents</font></p>

    <font face="book antiqua" size="4"><p><a href="#_toc381201081">introduction</a> <br>

    <a href="#_toc381201082">bitmap file format</a><br>

    </font><font face="book antiqua" size="3"> 

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a

    href="#_toc381201083">general</a> <br>

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a

    href="#_toc381201084">bmp contents</a> <br>

    </font><font face="book antiqua" size="4"><a href="#_toc381201085">field details </a><br>

    </font><font face="book antiqua" size="3"> 

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a

    href="#_toc381201086">height field </a><br>

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a

    href="#_toc381201087">bits per pixel field</a> <br>

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a

    href="#_toc381201088">compression field</a> <br>

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a

    href="#_toc381201089">colors field</a> <br>

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a

    href="#_toc381201090">important colors field</a> </font><u><font face="book antiqua"

    size="4"></p>

    </font></u><font face="book antiqua" size="6"><a name="_toc381201081"><p>introduction</a></p>

    </font></b><font face="book antiqua" size="3"><p align="justify">this document describes 

    the microsoft windows and ibm os/2 picture bitmap files, called bitmaps or bmp files. most 

    of the descriptions of the bmp file concentrate on the microsoft windows bmp structures 

    like </font><font face="courier new" size="3">bmpinfoheader</font><font

    face="book antiqua" size="3"> and </font><font face="courier new" size="3">bmpcoreinfo</font><font

    face="book antiqua" size="3"> , but only a few describe the file contents on byte level. 

    this information is therefor only intended to be used in applications where direct reading 

    and writing of a bmp file is required.</p>

    </font><b><font face="宋体" lang="zh-cn" size="6"><p align="justify"></font><font

    face="book antiqua" size="6"><a name="_toc381201082">bitmap file format</a></p>

    </font></b><font face="book antiqua" size="3"><p align="justify">the following chapters 

    contain the detailed information on the contents of the bmp file. first more general 

    information will be given regarding the byte order and file alignment. the second chapter 

    will concentrate on the byte-level contents of a bmp file. the third chapter will 

    elaborate on this chapter and explain some of the concepts - like compression - and/or 

    values in detail.</p>

    </font><b><font face="宋体" lang="zh-cn" size="5"><p></font><font face="book antiqua"

    size="5"><a name="_toc381201083">general</a></p>

    </font></b><font face="book antiqua" size="3"><p align="justify">the bmp file has been 

    created by microsoft and ibm and is therefor very strictly bound to the architecture of 

    the main hardware platform that both companies support: the ibm compatible pc. this means 

    that all values stored in the bmp file are in the intel format, sometimes also called the 

    little endian format because of the byte order that an intel processor uses internally to 

    store values.</p>

    <p align="justify">the bmp files are the way, windows stores bit mapped images. the bmp 

    image data is bit packed but every line must end on a dword boundary - if that</font><font

    face="宋体" lang="zh-cn" size="3">抯</font><font size="3"> </font><font

    face="book antiqua" size="3">not the case, it must be padded with zeroes. bmp files are 

    stored bottom-up, that means that the first scan line is the bottom line. </p>

    <p align="justify">the bmp format has four incarnations, two under windows (new and old) 

    and two under os/2, all are described here.</p>

    </font><b><font face="宋体" lang="zh-cn" size="5"><p></font><font face="book antiqua"

    size="5"><a name="_toc381201084">bmp contents</a></p>

    </font></b><font face="book antiqua" size="3"><p align="justify">the following table 

    contains a description of the contents of the bmp file. for every field, the file offset, 

    the length and the contents will be given. for a more detailed discussion, see the 

    following chapters.</p>

    </font><table border="1" cellspacing="2" bordercolor="#000000" cellpadding="7" width="657">

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3" color="#808080"><b><p

        align="justify">offset</b></font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3" color="#808080"><b><p

        align="justify">field</b></font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3" color="#808080"><b><p

        align="justify">size</b></font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3" color="#808080"><b><p

        align="justify">contents</b></font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">0000h</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">identifier</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">2 bytes</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">the 

        characters identifying the bitmap. the following entries are possible:</p>

        </font><font face="宋体" lang="zh-cn" size="3"><p align="justify">態</font><font

        face="book antiqua" size="3">m</font><font size="3">’ </font><font face="book antiqua"

        size="3">- windows 3.1x, 95, nt, </font><font size="3">…</font><font face="book antiqua"

        size="3"></p>

        </font><font face="宋体" lang="zh-cn" size="3"><p align="justify">態</font><font

        face="book antiqua" size="3">a</font><font size="3">’ </font><font face="book antiqua"

        size="3">- os/2 bitmap array</p>

        </font><font face="宋体" lang="zh-cn" size="3"><p align="justify">慍</font><font

        face="book antiqua" size="3">i</font><font size="3">’ </font><font face="book antiqua"

        size="3">- os/2 color icon</p>

        </font><font face="宋体" lang="zh-cn" size="3"><p align="justify">慍</font><font

        face="book antiqua" size="3">p</font><font size="3">’ </font><font face="book antiqua"

        size="3">- os/2 color pointer</p>

        </font><font face="宋体" lang="zh-cn" size="3"><p align="justify">慖</font><font

        face="book antiqua" size="3">c</font><font size="3">’ </font><font face="book antiqua"

        size="3">- os/2 icon</p>

        </font><font face="宋体" lang="zh-cn" size="3"><p align="justify">慞</font><font

        face="book antiqua" size="3">t</font><font size="3">’ </font><font face="book antiqua"

        size="3">- os/2 pointer</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">0002h</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">file 

        size</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 dword</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">complete 

        file size in bytes.</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">0006h</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">reserved</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 dword</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">reserved 

        for later use.</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">000ah</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">bitmap 

        data offset</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 dword</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">offset 

        from beginning of file to the beginning of the bitmap data.</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">000eh</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">bitmap 

        header size</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 dword</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">length 

        of the bitmap info header used to describe the bitmap colors, compression, </font><font

        size="3">… </font><font face="book antiqua" size="3">the following sizes are possible:</p>

        <p align="justify">28h - windows 3.1x, 95, nt, </font><font size="3">…</font><font

        face="book antiqua" size="3"></p>

        <p align="justify">0ch - os/2 1.x</p>

        <p align="justify">f0h - os/2 2.x</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">0012h</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">width</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 dword</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">horizontal 

        width of bitmap in pixels.</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">0016h</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">height</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 dword</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">vertical 

        height of bitmap in pixels.</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">001ah</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">planes</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 word</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">number 

        of planes in this bitmap.</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">001ch</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">bits 

        per pixel</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 word</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">bits 

        per pixel used to store palette entry information. this also identifies in an indirect way 

        the number of possible colors. possible values are:</p>

        <p align="justify">1 - monochrome bitmap</p>

        <p align="justify">4 - 16 color bitmap</p>

        <p align="justify">8 - 256 color bitmap</p>

        <p align="justify">16 - 16bit (high color) bitmap</p>

        <p align="justify">24 - 24bit (true color) bitmap</p>

        <p align="justify">32 - 32bit (true color) bitmap</font></td>

      </tr>

      <tr>

        <td width="10%" valign="top"><font face="book antiqua" size="3"><p align="justify">001eh</font></td>

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">compression</font></td>

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">1 dword</font></td>

        <td width="61%" valign="top"><font face="book antiqua" size="3"><p align="justify">compression 

        specifications. the following values are possible:</p>

        <p align="justify">0 - none (also identified by bi_rgb)</p>

        <p align="justify">1 - rle 8-bit / pixel (also identified by bi_rle4)</p>

        <p align="justify">2 - rle 4-bit / pixel (also identified by bi_rle8)</p>

        <p align="justify">3 - bitfields (also identified by bi_bitfields)</font></td>

      </tr>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -