Class ImageData
java.lang.Object
|
+----framework.ModuleData
|
+----ImageData
- class ImageData
- extends ModuleData
ImageData is the java class that contains pictures. If a gif is read from
disk in java the data is stored in an ImageData object.
-
image
-
-
ImageData()
-
-
display(String, String)
- Display the java image in a dialog window.
-
getHeight()
-
-
getImage()
-
-
getLoadTags()
- Define the valid extensions that files of this data type may use
when loading data from disk.
-
getSaveTags()
- Define the valid extensions that files of this data type may use
when saving data to disk.
-
getWidth()
-
-
load(String)
- Load a picture from disk.
-
main(String[])
-
-
save(String)
- Save the picture to disk.
-
setImage(Image)
-
image
private Image image
ImageData
ImageData()
getWidth
public int getWidth()
getHeight
public int getHeight()
getImage
public Image getImage()
setImage
public void setImage(Image image)
main
public static void main(String args[])
getLoadTags
protected String[] getLoadTags()
- Define the valid extensions that files of this data type may use
when loading data from disk.
- Overrides:
- getLoadTags in class ModuleData
getSaveTags
protected String[] getSaveTags()
- Define the valid extensions that files of this data type may use
when saving data to disk.
- Overrides:
- getSaveTags in class ModuleData
load
public void load(String filename) throws FileNotFoundException, IOException
- Load a picture from disk. The picture can be in several data formats:
gif, jpg, jpeg, bmp and tga. (When there are more than 1 picture of
bmp or tga loaded the thread that loads pictures will hang :( )
- Overrides:
- load in class ModuleData
- See Also:
- ImageLoader
save
public void save(String filename) throws FileNotFoundException, IOException
- Save the picture to disk. It can be saved in 2 data formats at this
point: gif and ppm.
- Overrides:
- save in class ModuleData
- See Also:
- ImageEncoder
display
public DataVisualisation display(String title,
String filename)
- Display the java image in a dialog window.
- Overrides:
- display in class ModuleData