W3C home > Mailing lists > Public > whatwg@whatwg.org > February 2008

[whatwg] <canvas> and ImageData

From: Anne van Kesteren <annevk@opera.com>
Date: Sun, 03 Feb 2008 11:46:25 +0100
Message-ID: <op.t5x2vnib64w2qv@annevk-t60.oslo.opera.com>
On Sun, 03 Feb 2008 10:43:10 +0100, Ian Hickson <ian at hixie.ch> wrote:
> On Fri, 25 Jan 2008, Oliver Hunt wrote:
>>
>> Another thing that we need is some way to determine what the device
>> pixel->css pixel ratio is.  Currently there's isn't even a real way to
>> tell that it's 1:1 -- you would have do do a fillRect(width-1, height-1,
>> 1, 1),; then getImageData(width-1, height-1, 1, 1) and see if they
>> match.  Conceivably you could do this multiple times to estimate the
>> ratio, but it would be non-trivial.
>
> Why would you need that data?

The moment people start using getImageData() as storage mechanism (which  
they will if browsers do not fix their data: image origin stuff) you'll  
have a problem with this if the application is accessed through different  
devices that have different ratios. I suspect though that given that  
Firefox has a 1:1 ratio sites will simply rely on that...


-- 
Anne van Kesteren
<http://annevankesteren.nl/>
<http://www.opera.com/>
Received on Sunday, 3 February 2008 02:46:25 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:08:39 UTC