mask-repack
Takes a pair of color and alpha images and combines them into a single transparent image. Works both in-browser and node.
Usage
combined = repack(color, alpha)
Takes color
and alpha
, two images encoded as ndarrays, and returns a single combined
ndarray image.
For example, you can combine this with mask-unpack in a preprocessing step to get transparent images encoded with JPG instead of PNG, potentially saving on page weight for certain images.
const Texture =const repack =const load =
See Also
License
MIT, see LICENSE.md for details.