-
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
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|