// load an image in an internal cache and
// draw it in the main window
&myImage = draw.mem.create()
draw.&myImage.load(path.desktop("myImage.jpg"))
draw.main.copyFrom.&myImage(null, null, null, null, 100, 100)
draw.main.paint()
// The following code do the same using the function loadImage:
&myImage = loadImage(path.desktop("myImage.jpg"))
draw.main.copyFrom.&myImage(null, null, null, null, 100, 100)
draw.main.paint()
// Or with no cache...
draw.main.load(path.desktop("myImage.jpg"), 100, 100)
draw.main.paint()
// If you want to retreive the size...
&imgSize = draw.main.load(
path.desktop("myImage.jpg"),
100, 100
)
alert("The size of the image is "&imgSize[0]" x "&imgSize[1]" pixels")
|