Skip to content

ImageData.data should return a Uint8ClampedArray instead of a CanvasPixelArray #403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zbjornson opened this issue Apr 15, 2014 · 4 comments

Comments

@zbjornson
Copy link
Collaborator

CanvasPixelArray is deprecated per https://www.w3.org/Bugs/Public/show_bug.cgi?id=12586.

I don't care, except CanvasPixelArray doesn't have a set method that typed arrays have.

Also encountered here by another user: http://stackoverflow.com/questions/21435027/node-js-canvas-implementation-with-uint8clampedarray

(Seeing if I understand this library well enough to submit a pull request...)

@miketahani
Copy link

Bump.

edit: also in need of the typed array set method

@mitar
Copy link
Contributor

mitar commented Sep 19, 2014

CanvasPixelArray is missing set, yes.

@puzrin
Copy link

puzrin commented Nov 3, 2014

Ping! It would be nice to retun Uint8ClampedArray.

We use this module for benchmarking vertical/horizontal convolvers. Improper array type cause deoptimizations, because JS thinks that convolver function become polymorphic (at first pass it receives CanvasPixelArray from src, at second - Uint8CampedArray from internal buffers).

Of cause, workarounds possible, but it would be nice if canvas works as expected.

@LinusU
Copy link
Collaborator

LinusU commented Aug 30, 2015

Fixed by #604

@LinusU LinusU closed this as completed Aug 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants