[whatwg] More random comments on the putImageData definition

Oliver Hunt oliver at apple.com
Wed Jan 23 02:07:29 PST 2008

Yet more commentary:
I noticed that the behaviour is undefined if putImagedata is provided  
an ImageData object on which the width, height, or data member is a  
getter that throws an exception.

A quick check shows that FFX3 throws a type mismatch -- eg. acts as  
though the field was invalid.

Ooh, and a request for a feature.  It would be great if putImageData  
could take a source region, in addition to the destination.  One of  
the primary reasons for using get/putImageData is to allow JS to  
rapidly blit data to the screen, however without an ability to blit  
only a subregion of the image data the only available options are to  
either re-blit the entire imagedata region (which can be expensive due  
to the need for [un]premultiplying in some (all?) implementations), or  
create and populate a new ImageData object which still requires more  
work than would ideally be necessary.


More information about the whatwg mailing list