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

[whatwg] More random comments on the putImageData definition

From: Oliver Hunt <oliver@apple.com>
Date: Sun, 10 Feb 2008 17:57:04 -0800
Message-ID: <7F3521D3-2545-4A71-B43E-F5CCE7561F50@apple.com>

On Feb 10, 2008, at 5:44 PM, Robert O'Callahan wrote:

> On Feb 11, 2008 1:05 PM, Oliver Hunt <oliver at apple.com> wrote:
> i was thinking having a style property, say, canvas-dpi: auto|device  
> or something, where the default auto value automagically does the  
> evil downsampling the moment a data routine is used, and device  
> would result in the right thing.  That said neither of these are  
> particularly nice. OTOH it would allow those who use get/ 
> putImageData to implement a basic video buffer (eg. the msx demo,  
> etc) to continue to do so.
> Wouldn't it be equivalent, yet simpler, to just define get/ 
> putImageData to do the evil 'auto' thing, and have additional  
> methods to do the right 'device' thing?

Not really -- a developer would need to do work to handle browsers  
that did not support the newer hidpi apis. The alternative (a css  
property or whatever) would allow a developer to use a single API, but  
tell the browser that they were aware that there may not be a 1:1  
ratio between the requested region and the amount of data returned --  
effectively it would be a flag to say "hey i actually do know the  
spec, and am not blindly expecting this to work on everyone else's  
computer just because it works on mine"


> Rob
> -- 
> "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]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20080210/46b250d8/attachment.htm>
Received on Sunday, 10 February 2008 17:57:04 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:00 UTC