<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Aiee...sorry for the trouble; cancel my earlier note. [I realize
putImageData and getImageData fill the bill : /.]<br>
<br>
Sincerely,<br>
<br>
Jeff C.<br>
<br>
<hr size="2" width="100%"><br>
Hi. Since March of '06, Opera 9 has supported a custom extension to
the canvas context called "opera-2dgame." Importantly, their extension
adds these methods:<br>
<br>
<b>getPixel(x, y)<br>
</b>Returns the pixel value (colour, opacity) at (x, y). Returned in
the form #rrggbb if fully opaque and rgba(r, g, b, a) if it has some
alpha transparency. <br>
<br>
<b>setPixel (x, y, color)<br>
</b>Allows you to set the colour of the pixel at (x, y). The third
argument should be a CSS color - you could provide a string such as
‘red’, a HTML colour code or even a rgba() value.<br>
<br>
I don't see any recent discussion of this. And I am also aware that
the canvas drawing model is not pixel-oriented. Nonetheless, mightn't
these functions be <i>extremely</i> useful? As the Opera folk point
out, they bless game developers, and it occurs to me that they could
be used for other neat, useful things, such as giving JavaScript a
rudimentary RAM drive. Description including several demo programs and
a discussion of security issues is available <a
href="http://my.opera.com/WebApplications/blog/show.dml/200788">here</a>.
<br>
<br>
Why not make getPixel () and setPixel() a standard?<br>
<br>
Regards,<br>
<br>
Jeff Creamer<br>
Computing Instructor<br>
Long Beach Unified School District<br>
<a class="moz-txt-link-abbreviated"
href="mailto:creamerj@roadrunner.com">creamerj@roadrunner.com</a><br>
<br>
<br>
</body>
</html>