loadKnobImage

Loads a knob image and rearrange channels to be fit to pass to UIImageKnob. Warning: the returned KnobImage should be destroyed by the caller with destroyFree. Note: internal resizing does not preserve aspect ratio exactly for approximate scaled rectangles.

ABDME_8 format (legacy 8-bit depth knobs)

The input format of such an image is an an arrangement of squares:

h h h h h +------------+------------+------------+------------+-----------+ | | | | | | | alpha | basecolor | depth | material | emissive | h | grayscale | RGB | grayscale | RMS | grayscale | | (R used) | |(sum of RGB)| | (R used) | | | | | | | +------------+------------+------------+------------+-----------+

This format is extended so that: - the emissive component is copied into the diffuse channel to form a full RGBA quad, - same for material with the physical channel, which is assumed to be always "full physical"

Recommended format: PNG, for example a 230x46 24-bit image. Note that such an image is formatted and resized in reflow before use.

More...
nothrow @nogc
loadKnobImage
(
in void[] data
)

Detailed Description

BADAMA_16 format (new 16-bit depth + more alpha channels)

h h h +------------+------------+------------+ | | | | | basecolor | depth | material | h | RGB | (G used) | RMS | | + | + | + | | alpha | alpha | alpha | +------------+------------+------------+

Recommended format: QOIX, for example a 512x128 16-bit QOIX image. Note that such an image is formatted and resized in reflow before use.

8-bit images are considered ABDME_8, and 16-bit images are considered BADAMA_16.

Meta