Interface DigitalPicture

All Known Implementing Classes:
Picture, SimplePicture

public interface DigitalPicture

Interface to describe a digital picture. A digital picture can have a associated file name. It can have a title. It has pixels associated with it and you can get and set the pixels. You can get an Image from a picture or a BufferedImage. You can load it from a file name or image. You can show a picture. You can create a new image for it.

Author:
Barbara Ericson

Method Summary
 int getBasicPixel(int x, int y)
          get the pixel information as an int
 BufferedImage getBufferedImage()
          get the buffered image
 String getFileName()
          get the file name that the picture came from
 int getHeight()
          get the height of the picture in pixels
 Image getImage()
          get the image from the picture
 Pixel getPixel(int x, int y)
          get the pixel information as an object
 String getTitle()
          get the title of the picture
 int getWidth()
          get the width of the picture in pixels
 void load(Image image)
          load the image into the picture
 boolean load(String fileName)
          load the picture from a file
 void setBasicPixel(int x, int y, int rgb)
          set the pixel information
 void setTitle(String title)
          set the title of the picture
 void show()
          show the picture
 

Method Detail

getFileName

String getFileName()
get the file name that the picture came from


getTitle

String getTitle()
get the title of the picture


setTitle

void setTitle(String title)
set the title of the picture


getWidth

int getWidth()
get the width of the picture in pixels


getHeight

int getHeight()
get the height of the picture in pixels


getImage

Image getImage()
get the image from the picture


getBufferedImage

BufferedImage getBufferedImage()
get the buffered image


getBasicPixel

int getBasicPixel(int x,
                  int y)
get the pixel information as an int


setBasicPixel

void setBasicPixel(int x,
                   int y,
                   int rgb)
set the pixel information


getPixel

Pixel getPixel(int x,
               int y)
get the pixel information as an object


load

void load(Image image)
load the image into the picture


load

boolean load(String fileName)
load the picture from a file


show

void show()
show the picture