Procs
proc gaussianKernel(radius: int): seq[uint32] {...}{.raises: [], tags: [].}
- Compute lookup table for 1d Gaussian kernel. Values are [0, 255] * 1024.
proc toStraightAlpha(data: var seq[ColorRGBA | ColorRGBX])
- Converts an image from premultiplied alpha to straight alpha. This is expensive for large images.
proc toPremultipliedAlpha(data: var seq[ColorRGBA | ColorRGBX])
- Converts an image to premultiplied alpha from straight alpha.
proc packAlphaValues(v: M128i): M128i {...}{.inline, raises: [], tags: [].}
- Shuffle the alpha values for these 4 colors to the first 4 bytes
proc unpackAlphaValues(v: M128i): M128i {...}{.inline, raises: [], tags: [].}
- Unpack the first 32 bits into 4 rgba(0, 0, 0, value)