摘要 |
System, method and apparatus for compressing and decompressing image data. In an embodiment, a color cell is compressed by: defining at least four luminance levels of the color cell; generating a bitmask for the color cell, the bitmask having a plurality of entries each corresponding to a respective one of the pixels, each of the entries for storing data identifying one of the luminance levels associated with a corresponding one of the pixels; calculating a first average color of pixels associated with a first one of the luminance levels; calculating a second average color of pixels associated with a second one of the luminance levels; and storing the bitmask in association with the first average color and the second average color. In a second embodiment of the present invention, a color cell is compressed by: determining a luminance value (Y) for each pixel of the color cell; selecting a maximum luminance value (YMAX) and a minimum luminance value (YMIN) for the color cell; subdividing the interval YMAX to YMIN into at least two approximately equal subintervals; generating at least one bitmask that associates each pixel of the color cell with one subinterval; and determining a representative color value for each subinterval from the pixels of the color cell associated with the subinterval. Compression can be performed at a real-time rate. The present invention can support the compression of luminance, intensity and alpha textures.
|