# Convert colors

Converts encoded images to RGB or grayscale. This tool can be used to convert raw image buffers received from camera hardware to color or grayscale images. Raw color images are produced by the Image Source with the autoDecode flag set to false.

This tool is useful in applications where the full RGB data received from a camera is not always needed or if decoding all frames takes too much time. It lets the application developer to move automatic decoding out of the image source and selectively decode color images when needed.

## Inputs

image
Any image, usually Bayer or YUV encoded. The tool also accepts RGB and gray-level input and can thus be used with all types of cameras (virtual or real).
outputType
Type of the output image.

## Outputs

image
Decoded image.

Type of the output image

Enumerator
Automatic

The type of the output image is the same as the type of the input image.

Color

Output is always a color RGB image.

Grayscale

Output is always a grayscale image.