
final class PixelImage {
  private Color[][] pixels;

  public PixelImage( int width, int height ) {
    pixels = new Color[ width ][ height ];
  }

  native public PixelImage( String path );

  public int getWidth() {
    return pixels.length;
  }

  public int getHeight() {
    return pixels[0].length;
  }

  public void drawPixel( int x, int y, Color color ) {
    if ( 0 <= x && x < pixels.length && 0 <= y && y < pixels[0].length )
      pixels[ x ][ y ] = color;
  }
}
