Skip to content

Confusing type of ImageData.data #807

Closed
@OndrejSpanel

Description

@OndrejSpanel

The ImageData.data is defined and documented as follows:

/** Is a Uint8ClampedArray representing a one-dimensional array containing the data in the RGBA order, with integer
* values between 0 and 255 (included).
*/
def data: js.Array[Int] = js.native

I am confused: is the type Uint8ClampedArray, or js.Array[Int]? Or are those types interchangeable somehow? If they are, perhaps the documentation could clarify how.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions