On Wed, Mar 25, 2009 at 3:11 AM, Ian Hickson <i...@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.
Isnt it better to take care that in C/Compiled code rather than in JavaScript .
code for converting from HSLA to RGBA will be already there in the browser code
so that need to be only exposed to JavaScript

Reply via email to