Difference between revisions of "Image"
Jump to navigation
Jump to search
(added Image.create to the table) |
m |
||
| Line 1: | Line 1: | ||
| − | In [[Mini Micro]], the <c>Image</c> class represents a picture, i.e. a rectangular array of pixel colors. | + | In [[Mini Micro]] and [[Soda]], the <c>Image</c> class represents a picture, i.e. a rectangular array of pixel colors. |
{| class="wikitable" | {| class="wikitable" | ||
| Line 19: | Line 19: | ||
[[Category:Mini Micro]] | [[Category:Mini Micro]] | ||
| + | [[Category:Soda]] | ||
Revision as of 04:43, 19 August 2021
In Mini Micro and Soda, the Image class represents a picture, i.e. a rectangular array of pixel colors.
| Method or Property | Purpose |
|---|---|
| Image.width | image width, in pixels |
| Image.height | image height, in pixels |
| Image.pixel(x,y) | get color of image pixel at x,y |
| Image.setPixel x,y, c | set color of image pixel at x,y to c |
| Image.getImage(left,bottom, width, height) | get a rectangular subregion of the image as a new Image |
| Image.create(width, height, c) | create and return a new Image initialized to color c |