[whatwg] getImageData/putImageData comments

Robert O'Callahan robert at ocallahan.org
Mon Jun 1 00:36:04 PDT 2009

On Mon, Jun 1, 2009 at 7:13 PM, Maciej Stachowiak <mjs at apple.com> wrote:

> On May 31, 2009, at 9:08 PM, Robert O'Callahan wrote:
> Here are a couple of relevant threads:
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-May/011284.html
> http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-February/013906.html
> Then there was a discussion on #whatwg more recently.
> http://krijnhoetmer.nl/irc-logs/whatwg/20090326#l-263
> So far it seems the data supports the hypothesis that authors expect
> getImageData to return 1 image pixel per CSS pixel and their scripts break
> when that's not true. That won't change until authors all have high-dpi
> screens.
> I'm not surprised. On the other hand, if we use CSS pixels, it won't be
> possible for authors to get it right, even if they do have high-dpi screens.
> It might be wise to have separate APIs (or a distinguishing parameter) to
> indicate whether you want scaled or true resolution. That way, unaware code
> gets a resolution loss, but aware code can do the right thing. I guess you
> suggested something like that in the IRC conversation you cited.


Why don't we just redefine getImageData right now to have the behaviour
authors are depending on, since we will likely be forced into that anyway?

I'm not sure whether we should define the new API right now
(getHighResolutionImageData?), or wait until CSS-to-device-pixel-ratios != 1
are common enough that authors are likely to use the new API correctly.

"He was pierced for our transgressions, he was crushed for our iniquities;
the punishment that brought us peace was upon him, and by his wounds we are
healed. We all, like sheep, have gone astray, each of us has turned to his
own way; and the LORD has laid on him the iniquity of us all." [Isaiah
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20090601/4622f1c3/attachment-0002.htm>

More information about the whatwg mailing list