×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    114

    CImageDecoder issue

    can i use the following instruction to build a CImageDecoder

    void buidImageDecoder(TFileName& aName, HBufC* aData)
    {
    if(iImageDeocder)
    delete iImageDecoder;

    iImageDecoder = CImageDecoder:ataNewL(iFs, aData);
    }

    the API available is static IMPORT_C CImageDecoder *DataNewL(RFs &aFs, const TDesC8 &aSourceData, const TOptions aOptions=EOptionNone, const TUid aImageType=KNullUid, const TUid aImageSubType=KNullUid, const TUid aDecoderUid=KNullUid);

    I am just wondering whether HBuf8 just derived from TDes8?


    Regards
    Zinan

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: CImageDecoder issue

    HBufC is HBufC16, you have to explicitly use HBufC8 if you want it.

    You might also want to try:
    Code:
    iImageDecoder = CImageDecoder::DataNewL(iFs, *aData);
    You can pass an HBufC pointer as a descriptor reference but you should dereference it first.

    Hope that helps,
    Sorcery

  3. #3
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    114

    Re: CImageDecoder issue

    hi:

    this is the code

    void CImageHandler::LoadFileAndScaleL(HBufC8* data)
    {
    ....
    iDecoder = CImageDecoder:ataNewL(iFs, data);//build based on the HBufC8 data

    ....
    }

    when compile, it generate error function call CImageHandler.DataNewL(...) not match..

    I try to cover it to TDes8, it works
    Last edited by sandy_zeng; 2007-12-13 at 13:54.

  4. #4
    Regular Contributor
    Join Date
    Mar 2003
    Posts
    61

    Re: CImageDecoder issue

    No, just do what Sorcery-ltd suggested, put the * in front of data when you call DataNewL.

Similar Threads

  1. issue with at+cusd over bluetooth link
    By hbanks in forum General Messaging
    Replies: 2
    Last Post: 2007-09-25, 21:21
  2. RTSP video streaming issue on 6280
    By olivier_irac in forum General Development Questions
    Replies: 0
    Last Post: 2006-12-04, 15:11
  3. Image Scaling/Sizing issue on the N70
    By sameet in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-07-24, 12:03
  4. CImageDecoder Color Depth Issue
    By sameet in forum Symbian Media (Closed)
    Replies: 0
    Last Post: 2006-06-28, 08:07
  5. Converting from SVG to Bitmap using CImageDecoder
    By Tatanka.nbr1 in forum Symbian
    Replies: 0
    Last Post: 2006-05-09, 12:36

Posting Permissions

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