知了博客

集天地之精华,吸日月之灵气

« ARM寄存器简介通往WinDbg的捷径(二) »

MS-Windows .bmp RLE4


In principle RLE4 coding is based on the same scheme as RLE8. The primary difference is the resolution of the colour index using 4 bit and a range of values between 0 and 15 (16 colours).


RLE4 coding scheme:




Within a run two colour indices are stored together in a byte value. If direct repititions of a single index appear, both the lower and the most significant 4 bits of the run value has to be identical. The run counter relates to the number of pixels and not to the entire byte.


  encoded   decoded  01 0F     0  02 0F     0 F  03 0F     0 F 0  04 0F     0 F 0 F  04 00     0 0 0 0

As defined for 8 bit RLE, the coding in absolute mode has to be extended to word boundaries too:


  encoded             decoded  00 03 12 30         1 2 3  00 04 12 34         1 2 3 4  00 05 12 34 50 00   1 2 3 4 5  00 06 12 34 56 00   1 2 3 4 5 6  00 07 12 34 56 70   1 2 3 4 5 6 7  00 08 12 34 56 78   1 2 3 4 5 6 7 8

 

来源:http://www.binaryessence.com/dct/en000072.htm


  • 相关文章:

发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

日历

最新评论及回复

最近发表

Powered By Z-Blog 1.8 Arwen Build 90619 Code detection by Codefense  theme by BokeZhuti

Copyright know blog. Some Rights Reserved.站长(msn):webmaster#webgou.info(#换成@) 粤ICP备09183716号