Add function to apply mask to RawImage. (#1020)
* Add function to apply mask to RawImage.
Add function to get a pixel and set a pixel.
* Simplify to use a single loop.
* Throw instead of silently converting to avoid unexpected errors.
* Rename function to better reflect what it does.
Remove unused functions.
* Update `putAlpha` function
---------
Co-authored-by: Joshua Lochner <admin@xenova.com>