[whatwg] createImageData -> new ImageData() ?

On Feb 3, 2008, at 2:38 AM, Anne van Kesteren wrote:

> Why not give the object a constructor? I think that's cleaner. Also,  
> Opera already supports that :-)
The biggest problem is that you would have to define the behaviour in  
a fairly counterintuitive way
new ImageData(400, 400) would not necessarily result in an ImageData  
object with width=400, height=400
as a system with a non-1:1 css to device pixel ratio.
>
> 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...
Part of my commentary was on a misunderstanding of the spec sorry :(

That said, what do you mean by using getImageData as a storage  
mechanism?

--Oliver


>
>
> -- 
> Anne van Kesteren
> <http://annevankesteren.nl/>
> <http://www.opera.com/>

Received on Sunday, 3 February 2008 03:20:54 UTC