Be careful when considering the bit depth of an image. IG_image_dimensions_get will always return the true bit depth (number of bits per pixel) of the image as stored internally by ImageGear. Since ImageGear can now store images with higher bit depths, and it stores alpha channels and extra channels in-line with the color channels, this number may be higher than you expect.
For example, consider the case where you call IG_image_dimensions_get and get a value of 32 for the bit depth. This means that 32 bits are used to represent each pixel in the image. In the past, this meant that the image was CMYK. But now it could also mean that the image is 24-bit RGB with an 8-bit alpha channel. It's also possible to see new bit depths like 36 or 48 for images with higher bit depths.
If you need to know the bit depth as reported by IG_image_dimensions_get in versions of ImageGear prior to 14.5, call IG_DIB_legacy_bit_depth_get. This is the bit depth you'll be using if you're using pixel access functions in the legacy mode, which is the default mode in 14.5.
If you need to know the bit depths of specific channels in the image, and/or what types of channels are present, use the following functions: