[whatwg] Canvas feedback
bijumaillist at gmail.com
Wed Mar 25 22:18:58 PDT 2009
On Wed, Mar 25, 2009 at 3:11 AM, Ian Hickson <ian at hixie.ch> wrote:
> On Sat, 14 Mar 2009, Biju wrote:
>> Just like canvas.getImageData() and canvas.putImageData()
>> Why canvas.getImageHSLData() and canvas.putImageHSLData() API are
>> not provide? Is it something discussed and planned not have?
> In practice user agents actually store image data as memory buffers of
> RGBA data, so handling RGBA data is (or at least can be) extremely
> efficient. HSLA data is not a native type, so it would be an inefficient
> type to provide native access to.
> In practice, if you need to work in the HSLA space, then you should
> convert the data to HSLA and back manually, which would highlight the
> performance bottleneck implied in such an approach. Alternatively, convert
> whatever algorithms you are using to work in the RGBA space.
As in both case the will be performance hit.
code for converting from HSLA to RGBA will be already there in the browser code
More information about the whatwg