Difference between revisions of "Image.pixel"

From MiniScript Wiki
Jump to navigation Jump to search
m
 
(One intermediate revision by the same user not shown)
Line 15: Line 15:
  
 
<ms>img = file.loadImage("/sys/pics/Dart.png")
 
<ms>img = file.loadImage("/sys/pics/Dart.png")
// print img.pixel(5, 7)</ms>
+
print img.pixel(5, 7)</ms>
  
 
[[Category:Mini Micro]]
 
[[Category:Mini Micro]]
 +
[[Category:Soda]]

Latest revision as of 04:43, 19 August 2021

Image.pixel returns the color of a specific pixel in the image.

Arguments

Parameter Name Type Default Value Meaning
x number 0 horizontal coordinate of the pixel of interest, from 0 to width - 1
y number 0 vertical coordinate of the pixel of interest, from 0 to height - 1

Example

img = file.loadImage("/sys/pics/Dart.png")
print img.pixel(5, 7)