ColorConversion: "GRAY" | "COLOR" | "ANY_COLOR" | "UNCHANGED"

Color conversion to apply during image loading.

  • GRAY: Load image as grayscale.
  • COLOR: Load image as 3-channel BGR.
  • ANY_COLOR: Load image as 3-channel BGR if the source color space is color, otherwise as single-channel grayscale. Alpha channel is discarded.
  • UNCHANGED: Load image as-is, preserving the alpha channel if it exists.