wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes friends, help me out by giving solution Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "friends, help me out by giving solution" Watch "friends, help me out by giving solution" New topic
Author

friends, help me out by giving solution

u sankarlal
Greenhorn

Joined: Aug 15, 2001
Posts: 11
hi all,
I'm having the Imageicon which is placed with an image. Now , I've to get the number of pixels in that image. How to achieve that ?
Anu-maheswari
Vinod Venugopal
Ranch Hand

Joined: Dec 06, 2000
Posts: 148
If u get access to the image , then getPixels() of PixelGrabber class should do.


- Vinod<br />-------<br />SCJP2
u sankarlal
Greenhorn

Joined: Aug 15, 2001
Posts: 11
hi,
thanx. I completed that with multiplying getIconHeight() and getIconWidth(). Now, the problem is I've to find the number of colors in that image ? Do you have any idea about that ?
thanx once again.
Friendly,
Anu-Maheswari
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Posted your answer here

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
u sankarlal
Greenhorn

Joined: Aug 15, 2001
Posts: 11
Hi friends,
I'm having one serious problem while dealing images. I 'm in need to find the size of the image occupied in memory. How to find that.

Also, how to find the properties of the image which should provide number of colors for that image ? That is, by using pixel grabber class, we can get the individual pixel and do the calculation, but that will be giving only the number of colors used in the image. But, what I need is total number of colors., irrespective of used or unused.
thanks in advance
Anu-Maheswari
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: friends, help me out by giving solution