Results 1 to 1 of 1
- 04-17-2010, 09:22 AM #1
Member
- Join Date
- Aug 2009
- Location
- Richmond, Canada
- Posts
- 15
- Rep Power
- 0
SWT ImageData -- How to obtain number of channels
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
we loaded an image and stored inJava Code:ImageData ideaImageData = new ImageData( getClass().getResourceAsStream("Idea.jpg"));In Eclipse' documentation atJava Code:ImageData ideaImageDat
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 ?
Cheers
JIA PeiWelcome to Vision Open
http://www.visionopen.com
Similar Threads
-
Unable to lock files on linux using java.nio.channels.FileLock
By sumayaji in forum Advanced JavaReplies: 2Last Post: 07-26-2011, 04:53 PM -
How to obtain the name of the JMenuItem?
By Azuxard in forum AWT / SwingReplies: 1Last Post: 03-23-2009, 03:33 AM -
Watch TV on PC - 12,000 TV Channels and Movies, save money Get $10 rebate.
By arturmoniswork in forum Reviews / AdvertisingReplies: 0Last Post: 12-30-2008, 05:56 AM -
Reading Web Pages with Nonblocking Channels
By Java Tip in forum java.netReplies: 0Last Post: 04-07-2008, 08:01 PM -
Reading Web Pages with Socket Channels
By Java Tip in forum java.netReplies: 0Last Post: 04-07-2008, 08:00 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks