DjvuNet
DjvuNet copied to clipboard
Convert Pixel colors representation from sbyte to byte
Originally image data handling was implemented with Pixel class using sbyte to represent RGB color data. This has large impact on whole 2D graphics engine, compression, codecs and other pipelines. Unfortunately this led to creation of many subtle errors arising from unchecked sbyte overflows, indexing with negative values (sbyte) etc. This is true for many other details of library. To eradicate source of this problems it would be best to convert use of signed integers to unsigned ones. Furthermore, reference implementation of DjVu format in DjVuLibre uses unsigned integer representaion in all major parts of library.