Re: Remove canvas createImageData(imagedata)

On Mon, 31 Aug 2009, Simon Pieters wrote:
> On Sun, 30 Aug 2009 23:44:15 +0200, Ian Hickson <ian@hixie.ch> wrote:
> > > 
> > > AFAICT it's just convenience for createImageData(imagedata.width,
> > > imagedata.height), but more confusing.
> > 
> > imagedata.width is not the CSS pixel width of the image data.
> 
> "When invoked with a single imagedata argument, it must return an ImageData
> object representing a rectangle with the same dimensions as the ImageData
> object passed as the argument."
> 
> It is not at all clear that "the same dimensions" are supposed to be different
> from imagedata.width and imagedata.height.

They're not. It's the numeric arguments to that function that are 
different.


> Also:
> 
> > > What's the use case for createImageData(imagedata)?

If you have a pipeline of filters and you need scratch space, you'll need 
an imagedata object of the same size as the one you're working with.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Monday, 31 August 2009 05:55:43 UTC