loadKnobImage

Loads a knob image and rearrange channels to be fit to pass to UIImageKnob.

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) | | | | | | | +------------+------------+------------+------------+-----------+

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

Detailed Description

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.

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.

Meta