×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Oct 2008
    Posts
    229

    Talking How can i draw a image?

    Hi:
    How can i draw a image?
    I don't know how to add the picture to my project, and how can i
    invoke the "CFbsBitmap::Load()" method.
    Some books(old book) said that before use the picture we must make a mdg file,right?
    I use carbide IDE.
    Help me,
    I'm green-hand.very thanks!

  2. #2
    Super Contributor
    Join Date
    Jul 2007
    Location
    ShenZhen, China
    Posts
    4,346

    Re: How can i draw a image?

    there has 2 way use image.
    1. image in mbg, it is generate by built.
    in mmp, like

    START BITMAP IMall.mbm
    TARGETPATH \system\apps\IMall
    HEADER
    SOURCEPATH ..\bmp_240x320
    source c12 version.bmp
    END

    and when you use
    CFbsBitmap* iImage = CEikonEnv::Static()->CreateBitmapL( KIMallUIPictureFileName, EMbmImallVersion);

    2. you can driect generate from file.
    like:

    CImageDecoder* decoder = NULL;
    TRAP(err, decoder = CImageDecoder::FileNewL(CEikonEnv::Static()->FsSession(),
    fname, mime, CImageDecoder::EOptionAlwaysThread));
    if ( err != KErrNone ) {
    return;
    }

    aImage = new (ELeave) CFbsBitmap;
    aMask = new (ELeave) CFbsBitmap;
    aImage->Create(decoder->FrameInfo().iOverallSizeInPixels, decoder->FrameInfo().iFrameDisplayMode);
    aMask->Create(decoder->FrameInfo().iOverallSizeInPixels, EGray256);

    TRequestStatus aStatus = KRequestPending;
    TRAPD(err1, decoder->Convert(&aStatus, *aImage, *aMask));
    User::WaitForRequest(aStatus);
    delete decoder;
    Last edited by qxiaoyuan; 2008-11-25 at 02:58.
    ----------------------------
    坚持学习, 坚持编码
    http://www.devdiv.net/
    qxiaoyuan

  3. #3
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: How can i draw a image?

    you also can use bmconv to manually construct the required mbm & mbg files in command line, or put the line in a bat file to be able to re-fresh the files with double click.

    Also you could check CFbsBitmap API documentation, and use the class directly.

Similar Threads

  1. Opening a JPEG Image
    By ummarbhutta in forum Mobile Java Media (Graphics & Sounds)
    Replies: 8
    Last Post: 2007-02-15, 06:34
  2. how to cut some part of Image
    By mshouab in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2006-08-04, 09:05
  3. draw image, on to an image?
    By jamiefuller in forum Mobile Java General
    Replies: 1
    Last Post: 2006-04-04, 10:15
  4. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31
  5. Series 40 - draw only a part of the image
    By ionutianasi in forum Mobile Java Media (Graphics & Sounds)
    Replies: 11
    Last Post: 2003-09-08, 04:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×