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

📄 bmp.html

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

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

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

        data 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">size of 

        the bitmap data in bytes. this number must be rounded to the next 4 byte boundary.</font></td>

      </tr>

      <tr>

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

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">hresolution</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 

        resolution expressed in pixel per meter.</font></td>

      </tr>

      <tr>

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

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">vresolution</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 

        resolution expressed in pixels per meter.</font></td>

      </tr>

      <tr>

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

        <td width="16%" valign="top"><font face="book antiqua" size="3"><p align="justify">colors</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">number 

        of colors used by this bitmap. for a 8-bit / pixel bitmap this will be 100h or 256.</font></td>

      </tr>

      <tr>

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

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

        colors</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">number 

        of important colors. this number will be equal to the number of colors when every color is 

        important.</font></td>

      </tr>

      <tr>

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

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

        <td width="14%" valign="top"><font face="book antiqua" size="3"><p align="justify">n * 4 

        byte</font></td>

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

        palette specification. for every entry in the palette four bytes are used to describe the 

        rgb values of the color in the following way:</p>

        <p align="justify">1 byte for blue component</p>

        <p align="justify">1 byte for green component</p>

        <p align="justify">1 byte for red component</p>

        <p align="justify">1 byte filler which is set to 0 (zero)</font></td>

      </tr>

      <tr>

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

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

        data</font></td>

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

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

        on the compression specifications, this field contains all the bitmap data bytes which 

        represent indices in the color palette.</font></td>

      </tr>

    </table>

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

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

    sizes were used in the specification above: </p>

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

    width="226">

      <tr>

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

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

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

        align="justify"># bytes</b></font></td>

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

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

      </tr>

      <tr>

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

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

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

      </tr>

      <tr>

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

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

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

      </tr>

      <tr>

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

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

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

      </tr>

    </table>

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

    face="book antiqua" size="6"><a name="_toc381201085">field details</a></p>

    </font></b><font face="book antiqua" size="3"><p align="justify">some of the fields 

    require some more information. the following chapters will try to provide this 

    information:</p>

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

    size="5"><a name="_toc381201086">height field</a></p>

    </font></b><font face="book antiqua" size="3"><p align="justify">the <i>height</i> field 

    identifies the height of the bitmap in pixels. in other words, it describes the number of 

    scan lines of the bitmap. if this field is negative, indicating a top-down dib, the <i>compression</i> 

    field must be either bi_rgb or bi_bitfields. top-down dibs cannot be compressed.</p>

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

    size="5"><a name="_toc381201087">bits per pixel field</a></p>

    </font></b><font face="book antiqua" size="3"><p align="justify">the <i>bits per pixel</i> 

    (bbp) field of the bitmap file determines the number of bits that define each pixel and 

    the maximum number of colors in the bitmap.</p>

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

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

      <li>when this field is equal to 1.</b></font></li>

    </ul>

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

      <dir>

        </font><font face="book antiqua" size="3"><p align="justify">the bitmap is monochrome, and 

        the palette contains 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 palette; if 

        the bit is set, the pixel has the color of the second entry in the table.</p>

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

      </dir>

    </dir>

    <ul>

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

      <li>when this field is equal to 4.</b></font></li>

    </ul>

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

      <dir>

        </font><font face="book antiqua" size="3"><p align="justify">the bitmap has a maximum of 

        16 colors, and the palette contains up to 16 entries. each pixel in the bitmap is 

        represented by a 4-bit index into the palette. for example, if the first byte in the 

        bitmap is 1fh, the byte represents two pixels. the first pixel contains the color in the 

        second palette entry, and the second pixel contains the color in the sixteenth palette 

        entry.</p>

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

      </dir>

    </dir>

    <ul>

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

      <li>when this field is equal to 8.</b></font></li>

    </ul>

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

      <dir>

        </font><font face="book antiqua" size="3"><p align="justify">the bitmap has a maximum of 

        256 colors, and the palette contains up to 256 entries. in this case, each byte in the 

        array represents a single pixel.</p>

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

      </dir>

    </dir>

    <ul>

      <b>

      <li>when this field is equal to 16.</b></font></li>

    </ul>

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

      <dir>

        </font><font face="book antiqua" size="3"><p align="justify">the bitmap has a maximum of 

        2^16 colors. if the <i>compression</i> field of the bitmap file is set to bi_rgb, the <i>palette</i> 

        field does not contain any entries. each word in the bitmap array represents a single 

        pixel. the relative intensities of red, green, and blue are represented with 5 bits for 

        each color component. the value for blue is in the least significant 5 bits, followed by 5 

        bits each for green and red, respectively. the most significant bit is not used.</p>

        <p align="justify">if the <i>compression</i> field of the bitmap file is set to 

        bi_bitfields, the <i>palette</i> field contains three dword color masks that specify the 

        red, green, and blue components, respectively, of each pixel. each word in the bitmap 

        array represents a single pixel.</p>

        <b><p align="justify">windows nt specific:</b> when the <i>compression</i> field is set to 

        bi_bitfields, bits set in each dword mask must be contiguous and should not overlap the 

        bits of another mask. all the bits in the pixel do not have to be used. </p>

        <b><p align="justify">windows 95 specific:</b> when the <i>compression</i> field is set to 

        bi_bitfields, windows 95 supports only the following 16bpp color masks: a 5-5-5 16-bit 

        image, where the blue mask is 0x001f, the green mask is 0x03e0, and the red mask is 

        0x7c00; and a 5-6-5 16-bit image, where the blue mask is 0x001f, the green mask is 0x07e0, 

        and the red mask is 0xf800.</p>

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

      </dir>

    </dir>

    <ul>

      <b>

      <li>when this field is equal to 24.</b></font></li>

    </ul>

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

      <dir>

        </font><font face="book antiqua" size="3"><p align="justify">the bitmap has a maximum of 

        2^24 colors, and the <i>palette</i> field does not contain any entries. each 3-byte 

        triplet in the bitmap array represents the relative intensities of blue, green, and red, 

        respectively, for a pixel.</p>

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

      </dir>

    </dir>

    <ul>

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

      <li>when this field is equal to 32.</b></font></li>

    </ul>

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

      <dir>

        </font><font face="book antiqua" size="3"><p align="justify">the bitmap has a maximum of 

        2^32 colors. if the <i>compression</i> field of the bitmap is set to bi_rgb, the <i>palette</i> 

        field does not contain any entries. each dword in the bitmap array represents the relative 

        intensities of blue, green, and red, respectively, for a pixel. the high byte in each 

        dword is not used.</p>

        <p align="justify">if the <i>compression</i> field of the bitmap is set to bi_bitfields, 

        the palette field contains three dword color masks that specify the red, green, and blue 

⌨️ 快捷键说明

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