-
Notifications
You must be signed in to change notification settings - Fork 15
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
setPixel? #8
Comments
Hello there, Yeah, currently the only way to access the raw pixels is through getPixels(). This will give you a Uint8ClampedArray of RGBA pixels, which you can manipulate. The problem is, you'd then have to use Sorry there isn't a better API. I'll add this to the TODO list for a future release. |
@jhuckaby thanks for the update, just wanted to check I wasn’t missing anything obvious Regards |
Hi,
I was just looking at the docs and I couldn't see a way to alter the image data? (eg
setPixel(x,y, rgba)
etc)Was wondering if I missed something?
Essentially in one example we want to be able to take a greyscale image, read each pixel's grey level and map it to another 256-colour palette
pseudocode:
alternatively eg using
getPixels
, modifying the array and callingsetPixels(modifiedArray)
admittedly this can be done with
thanks
J.
The text was updated successfully, but these errors were encountered: