public abstract class Compositor extends Object
createBuffer(int) method produces a buffer
containing a vector of pixels for which the compositing operation
can be performed on each element.
In general RGB values are not pre-multiplied by alpha as used by this class.
RgbImage| Modifier and Type | Class and Description |
|---|---|
static class |
Compositor.BoostCompositor
Compositor with boosted saturation.
|
static interface |
Compositor.Buffer
Buffer of pixels on which compositing operations can be performed.
|
| Modifier and Type | Field and Description |
|---|---|
static Compositor |
SATURATION
Implementation which adds colours until the alpha is saturated
and then makes no further updates to colour.
|
| Constructor and Description |
|---|
Compositor() |
| Modifier and Type | Method and Description |
|---|---|
static float |
byteToFloat(int i)
Maps an integer in the range 0-255 to a float in the range 0-1.
|
abstract Compositor.Buffer |
createBuffer(int count)
Creates a buffer on which compositing operations can be performed.
|
static int |
floatToByte(float f)
Maps a float in the range 0-1 to an int in the range 0-255.
|
abstract float |
scaleAlpha(float alpha)
Adjusts an alpha value in accordance with this compositor's policy.
|
static int |
srcOverOpaque(int sRgba,
int dRgb)
Returns the result of compositing a possibly transparent source pixel
over an opaque destination pixel.
|
public static final Compositor SATURATION
public abstract float scaleAlpha(float alpha)
alpha - input alpha in range 0-1public abstract Compositor.Buffer createBuffer(int count)
count - number of pixel elements in bufferpublic static float byteToFloat(int i)
i - integer valuepublic static int floatToByte(float f)
f - float in range 0-1public static int srcOverOpaque(int sRgba,
int dRgb)
sRgba - RGBA for source pixeldRgb - RGB for opaque destination pixelCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.