From MiniScript Wiki
Revision as of 04:44, 19 August 2021 by JoeStrout (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Image.getImage returns a rectangular portion of the image as a new image.


Parameter Name Type Default Value Meaning
left number 0 leftmost horizontal coordinate of the portion to get
bottom number 0 lowest vertical coordinate of the portion to get
width number image.width width (in pixels) of portion to get
height number image.height height (in pixels) of portion to get)


img = file.loadImage("/sys/pics/Wumpus.png")
eyes = img.getImage(35, 59, 60, 48)
view eyes