'sequence' help wanted
- Posted by Wolf <wolfritz at KING.IGS.NET> Feb 10, 2002
- 456 views
Can anyone help me with ( phase 2 ) of a BI_RLE4 bitmap encoding algorithm ? ... given that I start with a sequence of {count,color,count,color...} pairs like this... line={ #0B,#33,#2A,#44,#01,#77,#01,#88, #03,#11,#05,#66,#04,#33,#08,#33, #01,#33,#01,#44,#01,#33,#01,#44,#01,#33, #09,#77,#01,#33,#01,#44,#01,#33 } In BI_RLE4, the 'alternating' same pairs with a count of one should be 'reduced' as follows... ... where the new 'combined' color is simply: = remainder(color1,16)*16 + remainder(color2,16). result={ #0B,#33,#2A,#44,#02,#78, #03,#11,#05,#66,#04,#33,#08,#33, #05,#34, #09,#77,#03,#34 } ... speed is a +, TIA, wolfritz at king.igs.net