W3C home > Mailing lists > Public > public-html@w3.org > December 2011

[Bug 15041] New: Clarify dimensions of image returned by Canvas toDataURL

From: <bugzilla@jessica.w3.org>
Date: Fri, 02 Dec 2011 11:25:14 +0000
To: public-html@w3.org
Message-ID: <bug-15041-2495@http.www.w3.org/Bugs/Public/>

           Summary: Clarify dimensions of image returned by Canvas
           Product: HTML WG
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: jknotten@chromium.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,

It seems suggested, but not explicitly stated, that the dimensions of the image
produced by toDataURL will match that of the underlying image data, as returned
by context.getImageData(). The dimensions of the produced image will,
therefore, not necessarily be the same as width and height properties of the

It would be great to clarify this point in the spec. 

Below are some related paragraphs in the spec:

"The toDataURL() method must not include color space information in the
resource returned. Where the output format allows it, the color of pixels in
resources created by toDataURL() must match those returned by the
getImageData() method."


"Thus, in the 2D context, calling the drawImage() method to render the output
of the toDataURL() method to the canvas, given the appropriate dimensions, has
no visible effect."

Configure bugmail: https://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, 2 December 2011 12:16:29 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:16:18 UTC