[Home]History of PCX

HomePage | Recent Changes | Preferences

Revision 5 . . (edit) December 3, 2001 6:58 am by Zundark [allways -> always]
Revision 4 . . December 3, 2001 6:46 am by Taw [this agorithm is only for indexed-color images, complete algorithm of sorting palette]
Revision 3 . . November 28, 2001 5:36 pm by Zundark [rewrite first paragraph to allow for 24-bit PCX files ]
Revision 2 . . (edit) November 28, 2001 9:09 am by Kwaku
Revision 1 . . November 28, 2001 8:53 am by Taw [first version, please check]
  

Difference (from prior major revision) (minor diff, author diff)

Changed: 5c5

PCX compresion



PCX compresion of 8bpp indexed-color images




Changed: 11c11,13
It's usually (but not allways) enough to move the most-common colors into palette positions 0x00..0xc0, and least-used to palette positions 0xc1..0xff.
It's usually (but not always) enough to move the most-common colors into palette positions 0x00..0xc0, and least-used to palette positions 0xc1..0xff. Complete algorithm of sorting pallette is to count how many times
a color appears 63N+1 (for nonnegative integer N) times it a row, as only in such cases it's possible to use unprefixed color values to improve compression, and move colors with higher count into indexes 0x00..0xc0,
and all other to 0xc1..0xff. This is warranted to produce optimal results.

HomePage | Recent Changes | Preferences
Search: