Function rcg::convertImage

Function Documentation

bool rcg::convertImage(uint8_t *rgb_out, uint8_t *mono_out, const uint8_t *raw, uint64_t pixelformat, size_t width, size_t height, size_t xpadding)

Converts image to RGB and monochrome format. Supported formats can be checked with isFormatSupported().

Parameters:
  • rgb_out – Pointer to target array for rgb image. The array must have a size of 3*width*height pixel. The pointer can be 0.

  • mono_out – Pointer to target array for monochrome image. The array must have a size of width*height pixel. The pointer can be 0.

  • raw – Pointer to input pixels.

  • pixelformat – Pixel format of input.

  • width – Width of image.

  • height – Height of image.

  • xpadding – Padding of input image.

Returns:

False, if pixelformat is not supported. In this case, nothing is written to the target pointers.