[whatwg] createImageData should take unsigned long

Philip Jägenstedt philipj at opera.com
Mon Aug 24 05:18:06 PDT 2009

As far as I can see there's no good reason why createImageData should take  
a float as input rather than unsigned long. Having it as float creates the  
odd situation where (0.1, 0.1) gives a 1x1 ImageData while (10.1, 10.1)  
gives a 10x10 or 11x11 depening on if you ceil or round the input (not  
defined). Unless there's a compelling reason to allow something like (0.1,  
0.1) I suggest changing the type and leaving the float->unsigned  
conversion to WebIDL.

Philip Jägenstedt
Opera Software

More information about the whatwg mailing list