Drawing rgba(0, 255, 0, 0.5) (should be [0, 255, 0, 128] if non-premultiplied, and [0, 128, 0, 128] if premultiplied)

getImageData returns ???


Drawing a correct non-ImageData object: (should be yellow-blue gradient if it works)


Drawing with {0:r, 1:g, 2:b, ...} instead of [r, g, b, ...]: (should be yellow-blue gradient if it works)


Drawing with too small an array:


Drawing with too large an array:


Drawing with clipping: (should be yellow-blue gradient if it's not clipped)


Drawing out-of-range colour values: (gives multiple stripes if it the value gets wrapped instead of clamped)


Rounding non-integer values:


Handling invalid colour components:


Weird corruption in FF2 on Linux: