W3C home > Mailing lists > Public > public-html@w3.org > October 2010

[Bug 10930] New: CanvasPixelArray out of range behavior needs clarification

From: <bugzilla@jessica.w3.org>
Date: Fri, 01 Oct 2010 01:09:23 +0000
To: public-html@w3.org
Message-ID: <bug-10930-2495@http.www.w3.org/Bugs/Public/>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=10930

           Summary: CanvasPixelArray out of range behavior needs
                    clarification
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML Canvas 2D Context (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: jmann@microsoft.com
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


The spec is clear that the CanvasPixelArray contains image data in the range of
0..255, representing the 8 bit value for that component. However, the spec is
not clear on what the expected behavior should be when a value greater or less
than the range of 0..255 is assigned to the array.

The spec should be updated to include the following text:

"When a CanvasPixelArray object is indexed to modify an indexed property index,
with value value, the value of the component occupying the position index, in
the array must be set to value. If value is less than 0, it must be clamped to
zero. If value is more than 255, it must be clamped to 255."

Firefox, Chrome and Safari follow the behavior described in the proposed text.
This behavior is more inline with a previous version of the spec.

Rounding to the limits of 0 or 255 when out of range seems to be more logical
to a web developer than wrapping the value. 

http://lists.w3.org/Archives/Public/public-canvas-api/2010AprJun/0001.html

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
Received on Friday, 1 October 2010 01:09:24 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:39:20 UTC