|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DigitalPicture
Interface to describe a digital picture. A digital picture can have a
associated file name and a title. It has pixels
associated with it and you can get and set the pixels. You
can get an Image or a BufferedImage from a picture. You can load
it from a file name or image. You can show a picture. You can
create a new image for it.
Copyright Georgia Institute of Technology 2004
Method Summary | |
---|---|
int |
getBasicPixel(int x,
int y)
Returns the pixel value of a pixel in the DigitalPicture, given its coordinates. |
java.awt.image.BufferedImage |
getBufferedImage()
Method to get a BufferedImage from the DigitalPicture |
java.lang.String |
getFileName()
Method to get the file name associated with the DigitalPicture |
int |
getHeight()
Method to get the height of the DigitalPicture in pixels |
java.awt.Image |
getImage()
Method to get an Image from the DigitalPicture |
Pixel |
getPixel(int x,
int y)
Returns a Pixel object representing a pixel in the DigitalPicture given its coordinates |
java.lang.String |
getTitle()
Method to get the title of the DigitalPicture |
int |
getWidth()
Method to get the width of the DigitalPicture in pixels |
void |
load(java.awt.Image image)
Method to load the passed image into the DigitalPicture |
boolean |
load(java.lang.String fileName)
Method to load the contents of the passed filename into the DigitalPicture without throwing errors |
void |
setBasicPixel(int x,
int y,
int rgb)
Sets the value of a pixel in the DigitalPicture. |
void |
setTitle(java.lang.String title)
Method to set the title for the DigitalPicture |
void |
show()
Method to show the picture in a picture frame |
Method Detail |
---|
java.lang.String getFileName()
java.lang.String getTitle()
void setTitle(java.lang.String title)
title
- the title to use for the DigitalPictureint getWidth()
int getHeight()
java.awt.Image getImage()
java.awt.image.BufferedImage getBufferedImage()
int getBasicPixel(int x, int y)
x
- the x coordinate of the pixely
- the y coordinate of the pixel
void setBasicPixel(int x, int y, int rgb)
x
- the x coordinate of the pixely
- the y coordinate of the pixelrgb
- the new rgb value of the pixelPixel getPixel(int x, int y)
x
- the x coordinates of the pixely
- the y coordinates of the pixel
void load(java.awt.Image image)
image
- the image to useboolean load(java.lang.String fileName)
fileName
- the name of the file of the picture to load
void show()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |