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

[whatwg] createImageData

From: Vladimir Vukicevic <vladimir@pobox.com>
Date: Tue, 13 May 2008 13:53:29 -0700
Message-ID: <3A588C7C-DD91-495E-87F0-4FAAA2E60E71@pobox.com>

On May 10, 2008, at 4:53 PM, Vladimir Vukicevic wrote:
> I would amend the spec to state that if an object is passed to  
> putImageData with the necessary properties, but without having been  
> created by create/getImageData beforehand, that its dimensions are  
> aways in device pixels.

Some suggested language in section 3.12.11.1.11(!):

Instead of:

> If the first argment to the method is null or not an ImageData  
> object that was returned by createImageData() or getImageData() then  
> the putImageData() method must raise a TYPE_MISMATCH_ERR exception.

I would suggest:

The first argument to the method must be an ImageData object returned  
by createImageData(), getImageData(), or an object constructed with  
the necessary properties by the user.  If the object was constructed  
by the user, its width and height dimensions are specified in device  
pixels (which may not map directly to CSS pixels).  If null or any  
other object is given that does not present the ImageData interface,  
then the putImageData() method must raise a TYPE_MISMATCH_ERR exception.

     - Vlad
Received on Tuesday, 13 May 2008 13:53:29 UTC

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