code: @Override
  	public void deFilter(byte[] line, byte[] previousLine, int sampleBitCount) throws PngException {
  		PngFilterType filterType = PngFilterType.forValue(line[0]);
  		line[0] = 0;
  
  		PngFilterType previousFilterType = PngFilterType.forValue(previousLine[0]);
  		previousLine[0] = 0;
  
  		switch (filterType) {
  			case SUB: {
  				int previous = -(Math.max(1, sampleBitCount / 8) - 1);
  				for (int x = 1, a = previous; x < line.length; x++, a++) {
  					line[x] = (byte) (line[x] + ((a < 0) ? 0 : line[a]));
  				}
  				break;
  			}
  			case UP: {
  				for (int x = 1; x < line.length; x++) {
  					line[x] = (byte) (line[x] + previousLine[x]);
  				}
  				break;
  			}
  			case AVERAGE: {
  				int previous = -(Math.max(1, sampleBitCount / 8) - 1);
  				for (int x = 1, a = previous; x < line.length; x++, a++) {
  					line[x] = (byte) (line[x] + ((0xFF & ((a < 0) ? 0 : line[a])) + (0xFF & previousLine[x])) / 2);
  				}
  				break;
  			}
  			case PAETH: {
  				int previous = -(Math.max(1, sampleBitCount / 8) - 1);
  				for (int x = 1, xp = previous; x < line.length; x++, xp++) {
  					int result = this.paethPredictor(line, previousLine, x, xp);
  					line[x] = (byte) (line[x] + result);
  				}
  				break;
  			}
  		}
  		line[0] = filterType.getValue();
  		previousLine[0] = previousFilterType.getValue();
  	}
docs: {@inheritDoc}