W3C home > Mailing lists > Public > whatwg@whatwg.org > March 2007

[whatwg] order of the color components in an ImageData object.

From: Mathieu HENRI <p01@opera.com>
Date: Fri, 02 Mar 2007 14:57:26 +0100
Message-ID: <45E82D46.8020703@opera.com>
Mathieu HENRI wrote:
> Hi,
> 
> I couldn't find a mention of the order of the color components. Since 
> this may vary across device/resolution/screen/... the user agent should 
> deal with the pixel format in a transparent way and expose the 
> components in a consistent order. Say R,G,B,A as it is already used in 
> CSS and SVG.

Discard the above :p I just got noticed of:

"The pixels must be represented in this array in left-to-right order, 
row by row, starting at the top left, with each pixel's *red, green, 
blue, and alpha* components being given in that order."

Sorry.

> One more thing, it would be nice to allow to programmatically create an 
> ImageData object. The width and height attribute would be mandatory at 
> the instantiation. The data attribute would be filled with width * 
> height * 4 zeros.


-- 
Mathieu 'p01' HENRI
JavaScript developer, Opera Software ASA
Received on Friday, 2 March 2007 05:57:26 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:53 UTC