ImageData.data.toString() doesn't print pixel values anymore

RESOLVED INVALID

Status

()

--
minor
RESOLVED INVALID
9 years ago
7 years ago

People

(Reporter: humph, Unassigned)

Tracking

Trunk
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
Created attachment 433091 [details]
Test case

Previously, it was possible to get print pixels in ImageData.data via toString().  The recent implementation changes altered this.  I'm not sure what we should do (I liked the 3.6 behaviour, personally), but we no longer do what we used to:

* Firefox 3.6: toString() = 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
* Minefield: toString() = [object Uint8ClampedArray]
* Chrome: toString() = [object CanvasPixelArray]
* Safari: toString() =  (e.g., nothing)

Test case attached.
(Reporter)

Updated

9 years ago
Summary: ImageData.toString() doesn't print pixel values anymore → ImageData.data.toString() doesn't print pixel values anymore
yeah, earlier it used to just be a plain array... it's kind of a tossup, often printing the object if it was expanded out would not be what you'd want since you could get a ridiculously long string printed.
I would think the HTML5 spec or WebIDL fully specifies this (in particular, it should print [object CanvasPixelArray] unless I'm really confused).
Yep, it follows from ES5 + WebIDL + Typed Arrays + HTML that we are correct here. (In particular, due to a relatively recent change to HTML, it should be [object Uint8ClampedArray] and not [object CanvasPixelArray].)
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.