Get Color Depth

Color depth is measured in bits per pixel (bpp), used to provide information on the color components. This is either in terms of the bits used to indicate the color of a single pixel or the number of bits used for each color component of a single pixel. It can also be used to determine the quality of an image, as different image bpp results in varying image quality (higher bpp generally indicates more image definition).

An image file can be read from a file path using AnyBitmap.FromFile("FILE_PATH"). You can then use .BitsPerPixel on the generated AnyBitmap object to get the color depth of the image.