Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User adem666's Avatar
    Join Date
    Mar 2006
    Posts
    24
    is there any way to know an image is png32 or png8 in runtime state ?

    because, I need to know which image use how much heap when it s loaded.

    I can compute it with image.width x image.height. but, I need to know 32 or 8 bit depth to know exact heap size.

  2. #2
    Registered User bhanuchandar.k's Avatar
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868
    Hi adem666,

    Please refer the javax.microedition.lcdui.Graphics APIods toc . First create the image object from the image object get the graphics and try some of these meth to compute color depth getBlueComponent() , getReadComponent() , getGreenComponent() , getGrayScale() methods . May be these methods helps you .

    Depth of the image will be calculated like = r*g*b

  3. #3
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    The original format is irrelevant to the heap requirements. The number of bits per pixel will be chosen by the phone, usually to match it's display hardware (plus some implementation-dependent alpha data).

    Graham.

Similar Threads

  1. How to know an event is meeting or todo or anniversary?
    By sponnukumar in forum Mobile Java General
    Replies: 2
    Last Post: 2009-02-02, 12:51
  2. Is it possible to draw a line or text over an image?
    By ASP-NewBie in forum Symbian C++
    Replies: 6
    Last Post: 2008-04-09, 14:24
  3. Replies: 5
    Last Post: 2007-08-02, 13:22
  4. Replies: 3
    Last Post: 2003-12-04, 07:56
  5. How to know if a midlet is executed in a phone or in an emulator ?
    By ulysseo42 in forum Mobile Java Tools & SDKs
    Replies: 7
    Last Post: 2003-11-06, 07:15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved