1 package eu.svjatoslav.imagesqueeze.codec;
8 byte [] decodedRangeMap;
13 public Channel(int width, int height) {
14 rangeMap = new byte[width * height];
16 map = new byte[width * height];
18 decodedRangeMap = new byte[width * height];
19 decodedRangeMap[0] = (byte)255;
21 decodedMap = new byte[width * height];
27 for (int i=0; i < decodedMap.length; i++){
31 for (int i=0; i < decodedRangeMap.length; i++){
32 decodedRangeMap[i] = 0;
34 decodedRangeMap[0] = (byte)255;
36 for (int i=0; i < map.length; i++){
40 for (int i=0; i < rangeMap.length; i++){
47 public void printStatistics(){
48 float bitsPerPixel = (float)bitCount / (float)rangeMap.length;
49 System.out.println( (bitCount/8) + " bytes. " + bitsPerPixel + " bits per pixel.");