On Mon, Jun 1, 2009 at 7:13 PM, Maciej Stachowiak <span dir="ltr"><<a href="mailto:mjs@apple.com">mjs@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div style="word-wrap: break-word;"><div class="im"><br><div><div>On May 31, 2009, at 9:08 PM, Robert O'Callahan wrote:</div><blockquote type="cite"><div class="gmail_quote"><div>Here are a couple of relevant threads: <br>
</div></div><a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-May/011284.html" target="_blank">http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2007-May/011284.html</a><br> <a href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-February/013906.html" target="_blank">http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2008-February/013906.html</a><br>
Then there was a discussion on #whatwg more recently.<br> <a href="http://krijnhoetmer.nl/irc-logs/whatwg/20090326#l-263" target="_blank">http://krijnhoetmer.nl/irc-logs/whatwg/20090326#l-263</a><br><br>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.<br>
</blockquote></div><br></div><div>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.</div>
</div></blockquote></div><br>Yes.<br><br>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?<br><br>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.<br>
<br clear="all">Rob<br>-- <br>"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 53:5-6]<br>