|
showImage() displays an image in a window. When width and height are specified and the image size is larger than that, a scroll bar appears within the frame.
e.g.
im = Toolkit::getDefaultToolkit().getImage("test.jpg") showImage(im)
|
readImage() reads an image from file, URL, or InputStream.
e.g.
im = readImage("test.png") showImage(im)
This function depends on JIMI package.
|
writeImage() writes the specified image to a file or an OutputStream.
e.g.
im = readImage("test.png") writeImage(im, "test.bmp")
This function depends on JIMI package.
|
A Image object of the size width x height is created and the function drawFunc is called to draw something.
drawFunc(Graphics graphics)
imageType can be one of the constants: BufferedImage::TYPE_XXX_YYY.
e.g.
import("java.awt.Color") im = makeImage(100, 100, function (g){ g.setColor(Color::white) g.fillRect(0, 0, 100, 100) g.setColor(Color::blue) g.fillOval(0, 0, 100, 100) }) showImage(im)