Hi, all:

I'm wondering how I can obtain the number of channels for a loaded image, using SWT technology.

Let's have a look at the following website first.
Taking a look at SWT Images

By using
Java Code:
ImageData ideaImageData = new ImageData(
we loaded an image and stored in
Java Code:
ImageData ideaImageDat
In Eclipse' documentation at
Help - Eclipse SDK

Nothing can be found to tell "number of image channels", in the class "ImageData".

What I would like to find is something like a function getNbOfChannels();

If the loaded image "idea.jpg" is a color image, then, the function returns 3
If it is a gray image, then, the function returns 1.

Can anybody help to give me a hand ?