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

📄 tga.htm

📁 TGA格式
💻 HTM
📖 第 1 页 / 共 4 页
字号:
|   16   |     1  |  image pixel size.                                         |
|        |        |  number of bits in a pixel.  this is 16 for targa 16,      |
|        |        |  24 for targa 24, and .... well, you get the idea.         |
|        |        |                                                            |
|   17   |     1  |  image descriptor byte.                                    |
|        |        |  bits 3-0 - number of attribute bits associated with each  |
|        |        |             pixel.  for the targa 16, this would be 0 or   |
|        |        |             1.  for the targa 24, it should be 0.  for the |
|        |        |             targa 32, it should be 8.                      |
|        |        |  bit 4    - reserved.  must be set to 0.                   |
|        |        |  bit 5    - screen origin bit.                             |
|        |        |             0 = origin in lower left-hand corner.          |
|        |        |             1 = origin in upper left-hand corner.          |
|        |        |             must be 0 for truevision images.               |
|        |        |  bits 7-6 - data storage interleaving flag.                |
|        |        |             00 = non-interleaved.                          |
|        |        |             01 = two-way (even/odd) interleaving.          |
|        |        |             10 = four way interleaving.                    |
|        |        |             11 = reserved.                                 |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
|   18   | varies |  image identification field.                               |
|        |        |  contains a free-form identification field of the length   |
|        |        |  specified in byte 1 of the image record.  it's usually    |
|        |        |  omitted ( length in byte 1 = 0 ), but can be up to 255    |
|        |        |  characters.  if more identification information is        |
|        |        |  required, it can be stored after the image data.          |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
| varies | varies |  color map data.                                           |
|        |        |                                                            |
|        |        |  if the color map type is 0, this field doesn't exist.     |
|        |        |  otherwise, just read past it to get to the image.         |
|        |        |  the color map specification, describes the size of each   |
|        |        |  entry, and the number of entries you'll have to skip.     |
|        |        |  each color map entry is 2, 3, or 4 bytes.                 |
|        |        |                                                            |
|--------|--------|------------------------------------------------------------|
| varies | varies |  image data field.                                         |
|        |        |                                                            |
|        |        |  this field specifies (width) x (height) pixels.  the      |
|        |        |  rgb color information for the pixels is stored in         |
|        |        |  packets.  there are two types of packets:  run-length     |
|        |        |  encoded packets, and raw packets.  both have a 1-byte     |
|        |        |  header, identifying the type of packet and specifying a   |
|        |        |  count, followed by a variable-length body.                |
|        |        |  the high-order bit of the header is "1" for the           |
|        |        |  run length packet, and "0" for the raw packet.            |
|        |        |                                                            |
|        |        |  for the run-length packet, the header consists of:        |
|        |        |      __________________________________________________    |
|        |        |      | 1 bit |   7 bit repetition count minus 1.      |    |
|        |        |      |   id  |   since the maximum value of this      |    |
|        |        |      |       |   field is 127, the largest possible   |    |
|        |        |      |       |   run size would be 128.               |    |
|        |        |      |-------|----------------------------------------|    |
|        |        |      |   1   |  c     c     c     c     c     c    c  |    |
|        |        |      --------------------------------------------------    |
|        |        |                                                            |
|        |        |  for the raw packet, the header consists of:               |
|        |        |      __________________________________________________    |
|        |        |      | 1 bit |   7 bit number of pixels minus 1.      |    |
|        |        |      |   id  |   since the maximum value of this      |    |
|        |        |      |       |   field is 127, there can never be     |    |
|        |        |      |       |   more than 128 pixels per packet.     |    |
|        |        |      |-------|----------------------------------------|    |
|        |        |      |   0   |  n     n     n     n     n     n    n  |    |
|        |        |      --------------------------------------------------    |
|        |        |                                                            |
|        |        |                                                            |
|        |        |  for the run length packet, the header is followed by      |
|        |        |  a single color value, which is assumed to be repeated     |
|        |        |  the number of times specified in the header.  the         |
|        |        |  packet may cross scan lines ( begin on one line and end   |
|        |        |  on the next ).                                            |
|        |        |                                                            |
|        |        |  for the raw packet, the header is followed by             |
|        |        |  the number of color values specified in the header.       |
|        |        |                                                            |
|        |        |  the color entries themselves are two bytes, three bytes,  |
|        |        |  or four bytes ( for targa 16, 24, and 32 ), and are       |
|        |        |  broken down as follows:                                   |
|        |        |                                                            |
|        |        |  the 2 byte entry -                                        |
|        |        |  arrrrrgg gggbbbbb, where each letter represents a bit.    |
|        |        |  but, because of the lo-hi storage order, the first byte   |
|        |        |  coming from the file will actually be gggbbbbb, and the   |
|        |        |  second will be arrrrrgg. "a" represents an attribute bit. |
|        |        |                                                            |
|        |        |  the 3 byte entry contains 1 byte each of blue, green,     |
|        |        |  and red.                                                  |
|        |        |                                                            |
|        |        |  the 4 byte entry contains 1 byte each of blue, green,     |
|        |        |  red, and attribute.  for faster speed (because of the     |
|        |        |  hardware of the targa board itself), targa 24 image are   |
|        |        |  sometimes stored as targa 32 images.                      |
|        |        |                                                            |
--------------------------------------------------------------------------------</pre>
    </td>
  </tr>
</table>
</center></div>

<p align="center"><a href="../index.htm">返回</a></p>
</body>
</html>

<br><br><br>
<div align="center"><center>
  <table cellspacing="0" cellpadding="1" border="0" width="770" style="font-size: 9pt;" >
    <tr><td width="770" bgcolor="#000000" height="1"></td></tr>
    <tr><td width="770" height="5"></td></tr>
    <tr>
      <td align="center" width="770">
	  <a href="/" target="_top">月光软件</a>┊<a href="/download/" target="_top">程序下载</a>┊<a href="/doc/" target="_top">编程文档</a>┊<a href="/book/" target="_top">电脑教程</a>┊<a href="/web/" target="_top">网站设计</a>┊<a href="/site/" target="_top">网址导航</a>┊<a href="/art/" target="_top">网络文学</a>┊<a href="/game/" target="_top">游戏天地</a>┊<a href="/joke/" target="_top">幽默笑话</a>┊<a href="/life/" target="_top">生活休闲</a>┊<a href="/picture/" target="_top">美女图片</a>┊<a href="/guestbook/" target="_top">意见反馈</a><br>
<a href="/program/bbs/docelite1105.htm">电脑技术</a>┊<a href="/program/bbs/docelite405353.htm">编程开发</a>┊<a href="/program/bbs/docelite25188.htm">网络专区</a>┊<a href="/program/bbs/docelite10811.htm">谈天说地</a>┊<a href="/program/bbs/docelite113108.htm">情感世界</a>┊<a href="/program/bbs/docelite872697.htm">游戏元素</a>┊<a href="/program/bbs/docelite50820.htm">分类游戏</a>┊<a href="/program/bbs/docelite166458.htm">热门游戏</a>┊<a href="/program/bbs/docelite42994.htm">体育运动</a>┊<a href="/program/bbs/docelite872698.htm">手机专区</a>┊<a href="/program/bbs/docelite28075.htm">业余爱好</a>┊<a href="/program/bbs/docelite34403.htm">影视沙龙</a><br>
<a href="/program/bbs/docelite872701.htm">音乐天地</a>┊<a href="/program/bbs/docelite872702.htm">数码广场</a>┊<a href="/program/bbs/docelite121902.htm">教育园地</a>┊<a href="/program/bbs/docelite872703.htm">科学大观</a>┊<a href="/program/bbs/docelite991826.htm">古今纵横</a>┊<a href="/program/bbs/docelite49868.htm">谈股论金</a>┊<a href="/program/bbs/docelite55064.htm">人文艺术</a>┊<a href="/program/bbs/docelite165391.htm">医学保健</a>┊<a href="/program/bbs/docelite115338.htm">动漫图酷</a>┊<a href="/program/bbs/docelite872704.htm">二手专区</a>┊<a href="/program/bbs/docelite112364.htm">地方风情</a>┊<a href="/program/bbs/docelite165368.htm">各行各业</a><br><br>
      <a href="/">月光软件站</a>·<a href="/sitemap.htm" target="_blank">版权所有</a>
	</td></tr>
  </table>
</center></div>


<script type="text/javascript" src='/program/bbs/bottom.js'></script>



<div align="center" id="objbottom"><center>
<script type="text/javascript"> 
cpro_client='williamlongcpr';
cpro_cbd='#FFFFFF'; 
cpro_cbg='#trans'; 
cpro_ctitle='#222222'; 
cpro_cdesc='#090909'; 
cpro_curl='#FFFFFF'; 
cpro_clink='#000000'; 
cpro_flush=4; 
cpro_w=728; 
cpro_h=90; 
cpro_template='text_noframe_728_90'; 
</script>
<script language="JavaScript" type="text/javascript" src="http://cpro.baidu.com/cpro/ui/cp.js"></script>
</center></div>
<script language="javascript">
if(document.all.item("objtop") != null)
{
objtop.innerHTML = objbottom.innerHTML
}
</script> 






<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "UA-272027-6";
urchinTracker();
</script>

<br><br><br><br><br><br>


<!--  */  //-->

⌨️ 快捷键说明

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