SWT ImageData -- How to obtain number of channels
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
we loaded an image and stored in
ImageData ideaImageData = new ImageData(
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 ?