-
Serious Problem with Images
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
-
Re: Serious Problem with Images
Hello,
getting the size of an image sometimes causes troubles
heres a trick I learned to overcome
// creating image
Image theImage = createImage(somewidth, someheight);
..... etc ... etc
// get sizes
while(theImage.getWidth(null) == -1){}
while(theImage.getHeight(null) == -1){}
int width = theImage.getWidth(null);
int height = theImage.getHeight(null);
As for other question dont quite understand what you want,
hope this was of some help
"Anu maheswari" <maheswari@equadriga.com> wrote:
>
>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
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks