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

[whatwg] More random comments on the putImageData definition

From: Oliver Hunt <oliver@apple.com>
Date: Wed, 23 Jan 2008 02:07:29 -0800
Message-ID: <8DCC2D75-6B89-4386-B752-A8FD6567AF8E@apple.com>
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.

--Oliver
Received on Wednesday, 23 January 2008 02:07:29 UTC

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