|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjavalib.worldimages.ImageMaker
public class ImageMaker
This class allows the user to read image data from a .png file
and save it as a RenderedImage in the format that
is used for the World when drawing on its canvas.
| Field Summary | |
|---|---|
static ColorModel |
canvasColorModel
|
ColorModel |
cmodel
|
ColorConvertOp |
colorOp
|
int |
height
|
BufferedImage |
image
|
BufferedImage |
imageSource
the buffer that saves the user-generated image |
(package private) File |
inputfile
|
static HashMap<String,BufferedImage> |
loadedImages
|
int |
width
|
| Constructor Summary | |
|---|---|
protected |
ImageMaker()
Default constructor, so we can define a subclass that uses url for file name - used by applets |
|
ImageMaker(String filename)
Construct the BufferedImage from the given file. |
| Method Summary | |
|---|---|
Color |
getColorPixel(int x,
int y)
Get the specified pixel in the image
as an RGB color. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static ColorModel canvasColorModel
public ColorModel cmodel
public ColorConvertOp colorOp
public int height
public BufferedImage image
public BufferedImage imageSource
File inputfile
public static HashMap<String,BufferedImage> loadedImages
public int width
| Constructor Detail |
|---|
protected ImageMaker()
public ImageMaker(String filename)
BufferedImage from the given file.
The file can be given as an URL, or a reference to local image file.
If this image has been loaded already, use the saved version.
filename - the file name for the desired image| Method Detail |
|---|
public Color getColorPixel(int x,
int y)
image
as an RGB color.
x - the x coordinate of the pixely - the y coordinate of the pixel
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||