private void setColour(Coordinate coordinate, int colour) { raster[coordinate.y * width + coordinate.x] = colour; }
// return list of colour components for pixel (x,y), with one entry for each colour band: red, green and blue public byte[] getColourBands(Coordinate coordinate) { var abgr = getColour(coordinate); return(new byte[] { (byte)Tiff.GetR(abgr), (byte)Tiff.GetG(abgr), (byte)Tiff.GetB(abgr) }); }
// return 32 bit representation of colour of pixel (x,y) in ABGR byte order public int getColour(Coordinate coordinate) { return(raster[coordinate.y * width + coordinate.x]); }