hsv2rgb

Convert HSV image to RGB color format.

If HSV is represented in floating point, H is 0-360 degrees, S and V is 0.0-1.0. If it's of integral type, S and V values are in 0-100 range.

Output range values are based on the output type cast - ubyte will range RGB values to be 0-255, ushort 0-65535, and floating types 0.0-1.0. Other types are not supported.

Slice!(SliceKind.contiguous, [3], R*)
hsv2rgb
pure nothrow
(
R
V
)
(
Slice!(SliceKind.contiguous, [3], V*) input
,
Slice!(SliceKind.contiguous, [3], R*) prealloc = emptySlice!([3], R)
)
if (
isNumeric!R &&
isNumeric!V
)
in { assert (input.length!2 == 3, "Invalid channel count."); }

Parameters

input
Type: Slice!(SliceKind.contiguous, [3], V*)

HSV image, which gets converted to RGB.

prealloc
Type: Slice!(SliceKind.contiguous, [3], R*)

Pre-allocated range, where RGB image will be copied. Default argument is an empty slice, where new data is allocated and returned. If given slice is not of corresponding shape(range.shape[0], range.shape[1], 3), it is discarded and allocated anew.

Return Value

Type: Slice!(SliceKind.contiguous, [3], R*)

Returns RGB verion of the given HSV image.

Note: Input and pre-allocated slices' strides must be identical.

Meta