public WritableRaster decode(RenderedImage img,Rectangle newRect,byte[] bpixels){
  if (image == null) {
    setupSourceImage(img);
  }
  setupBufferForDecoding();
  unitsInThisTile=newRect.width * newRect.height * numBands;
  decodeTilePixels(bpixels,newRect);
  decodeColor(newRect);
  return setTilePixels(newRect);
}

public WritableRaster decode ( RenderedImage img , Rectangle newRect , byte [ ] bpixels ) { if ( image == null ) { setupSourceImage ( img ) ; } setupBufferForDecoding ( ) ; unitsInThisTile = newRect . width * newRect . height * numBands ; decodeTilePixels ( bpixels , newRect ) ; decodeColor ( newRect ) ; return setTilePixels ( newRect ) ; }
decode a rectangle of data stored in bpixels into a raster tile . usually you will not need to override this , but instead implement the decodetilepixels methods .
