|
showImage() displays an image file (url) within a Frame. When a double value ratio_x(y) is specified, the image displayed fits in the size. When a int value pixels is specified the image displayed fits in the size.
|
ImageCanvas class is provided in order to display images.
e.g:
import("java.awt.*") import("pnuts.awt.*") function showImage(fileOrURL){ f = frame(""+fileOrURL) p = ImageCanvas(fileOrURL) f.add(p) f.pack() f.show() p.sync() p.repaint() return f }