×

Discussion Board

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

    Image Decoder with no GUI on a DLL

    Hi,

    I've been trying to convert a regular UCHAR .bmp (from a buffer) to CFbsBitmap using the iDecoder = CImageDecoder:: DataNewL(fsSession, imgptr, CImageDecoder::EOptionNone);

    And later:

    TFrameInfo iFrameInfo = iDecoder->FrameInfo();
    TInt frameCount = iDecoder->FrameCount();
    TSize size = iFrameInfo.iOverallSizeInPixels;
    mBitmap->Reset();
    TInt err = mBitmap->Create(size, EGray2);
    TSize bsize = mBitmap->SizeInPixels();
    iDecoder->Convert(&iStatus, *mBitmap);
    if(!IsActive())
    SetActive();

    I'm having problems to get the conversion even though I'm starting the sessions.

    mFs.Connect();
    RFs& fsSession = mFs;
    RFbsSession::Connect(fsSession);

    The call to iDecoder->Convert(&iStatus, *mBitmap); returns and leads to RunL(). However, even though the size of the bitmap that I created is correct, the new mBitmap is always empty.

    I'm doing this on a dll, therefore I have no GUI. I have tried to start new sessions, etc but I always remain with an empty bmp.

    What else could I be missing from the session?

    I have even tried the following with no luck:

    RWsSession();
    iWsSession.Connect();
    RFbsSession::Connect();

    What is the procedure for using the image decoder when using a dll and no GUI? I do not want to end up writing the .bmp to .mbm converter code just because this doesn't work.

    Thanks,

    Rafa
    Last edited by maya_rafael; 2009-02-03 at 16:23.

  2. #2
    Registered User
    Join Date
    Jan 2007
    Posts
    282

    Re: Image Decoder with no GUI on a DLL

    1. I think giving the mime type to Image Decoder may help try iDecoder = CImageDecoder:: DataNewL(fsSession, imgptr, ,_L8("image/bmp",CImageDecoder::EOptionNone). Usually CImageDecoder tries to guess the image type from data header and it might be guessing to something wrong.

    2. mBitmap->Create(size, EGray2)!! you are creating a 1 bpp image which will only contain black/white pixels it may be the case that your bmp may be this new color space all pixels might be mapped to black pixels. Please try the color mode of EGray256 or higher to confirm this.

    Hope this helps,
    VJ

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

    Re: Image Decoder with no GUI on a DLL

    Also you could try whether CWsBitmap would work better instead of CFbsBitmap.

Similar Threads

  1. PC Suite error: (Code: Init IMediaControl2) HELP?!
    By chunkyspudmonkey in forum General Development Questions
    Replies: 30
    Last Post: 2014-07-15, 05:44
  2. Replies: 6
    Last Post: 2009-01-31, 10:13
  3. Linking Static DLL with another Static DLL
    By symbianfresher in forum Symbian
    Replies: 6
    Last Post: 2006-01-09, 04:23
  4. HELP: Mutable Image to Immutable Image?
    By rj_cybersilver in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2005-03-26, 09:58
  5. Loading Image data from 'raw' bytes
    By LongSteve in forum Mobile Java General
    Replies: 2
    Last Post: 2002-11-20, 17:38

Posting Permissions

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