| java.lang.Object org.cougaar.demo.mandelbrot.util.ImageOutput
ImageOutput | final public class ImageOutput (Code) | | Image output utilities.
|
Method Summary | |
public static Image | createImage(int width, int height, byte[] data, Palette palette) Create an image from the given data. | public static void | displayImage(int width, int height, byte[] data) Display the image data in a popup Swing UI. | public static void | displayImage(Image image) Pop-up a simple frame that display the image and calls
System.exit when the "close" box is clicked. | public static void | writeImage(int width, int height, byte[] data, Palette palette, String format, OutputStream out) Write image data to an output stream.
Parameters: width - the data width Parameters: height - the data height Parameters: data - an array with length at least (width * height) Parameters: palette - optional color palette, defaults to the default paleete Parameters: format - the image format, e.g. | public static void | writeImage(Image image, String filename) Write an image to a file. | public static void | writeImage(Image image, String format, OutputStream out) Write an image to an output stream. | public static void | writeJPG(int width, int height, byte[] data, OutputStream out) Write the image data as a JPEG. |
displayImage | public static void displayImage(Image image)(Code) | | Pop-up a simple frame that display the image and calls
System.exit when the "close" box is clicked.
This is primarily intended as example code and for debugging purposes.
|
writeImage | public static void writeImage(int width, int height, byte[] data, Palette palette, String format, OutputStream out)(Code) | | Write image data to an output stream.
Parameters: width - the data width Parameters: height - the data height Parameters: data - an array with length at least (width * height) Parameters: palette - optional color palette, defaults to the default paleete Parameters: format - the image format, e.g. "png" or "jpg" Parameters: out - the output stream to write the image to |
writeImage | public static void writeImage(Image image, String filename) throws IOException(Code) | | Write an image to a file.
Parameters: filename - a name ending in either ".jpg" or ".png" |
|
|