Back to FabImage Library website

You are here: Start » Function Reference » Image » Image Color Spaces » RgbToHsl

RgbToHsl


Header: FIL.h
Namespace: fil
Module: FoundationBasic

Converts color space from Red-Green-Blue to Hue-Saturation-Luminance.

Applications: Color analysis is easier in the HSL color space than in RGB.

Syntax

C++
C#
 
void fil::RgbToHsl
(
	const fil::Image& inRgbImage,
	fil::Image& outHslImage
)

Parameters

Name Type Default Description
Input value inRgbImage const Image&
Output value outHslImage Image&

Requirements

For input inRgbImage only pixel formats are supported: 3⨯uint8.

Read more about pixel formats in Image documentation.

Hardware Acceleration

This operation supports automatic parallelization for multicore and multiprocessor systems.

This operation supports processing on OpenCL compatible device.

Errors

List of possible exceptions:

Error type Description
DomainError Not a 3-channel and 8-bit image in RgbToHsl.
DomainError Not supported inRgbImage pixel format in RgbToHsl. Supported formats: 3xUInt8.