Picture
, SimplePicture
public interface DigitalPicture
Modifier and Type | Method | Description |
---|---|---|
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
|
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 pixelvoid 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 pixelvoid 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 loadvoid show()