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

[whatwg] createImageData

From: Vladimir Vukicevic <vladimir@pobox.com>
Date: Mon, 2 Jun 2008 12:03:02 -0700
Message-ID: <66629F5C-A66F-484E-AAF4-6618BF7AA574@pobox.com>

Sorry it took me a bit to respond here... so, ok, based on the  
discussion, I'd suggest:

- user-created ImageData-like objects should be supported, e.g. with  
language such as:

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.

- ImageData objects returned by createImageData or getImageData should  
behave as currently specified; that is, they should explicitly clamp  
on pixel assignment.

That gives users a choice over which approach they want to take, and  
whether they want clamping or not.

How's that sound?

     - Vlad
Received on Monday, 2 June 2008 12:03:02 UTC

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