×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    about the thumbnail, a bug??

    I use the code below to get the thumbnail.

    First I convert the file to CFbsBitmap object in an AO, it works well.

    Code:
    void CThumbNail::StartToDecodeL( TFileName& aFileName )
        {
        
        delete iImageDecoder; iImageDecoder = NULL;
        delete iBitmap; iBitmap = NULL;
    
        iImageDecoder = CImageDecoder::FileNewL( iFs, aFileName ));
     	
        iBitmap = new (ELeave) CFbsBitmap();
        TInt err = iBitmap->Create( iImageDecoder->FrameInfo().iOverallSizeInPixels,
                         iImageDecoder->FrameInfo().iFrameDisplayMode ); 
        iImageDecoder->Convert( &iStatus, *iBitmap );
        SetActive();
        }
    But when I use this method in a console, it fails
    Code:
     fileName = _L("c:\\Media files\\image\\fff.JPEG");
        iImageDecoder = CImageDecoder::FileNewL( iFs, fileName );
    
        iBitmap = new (ELeave) CFbsBitmap();    
        
        err = iBitmap->Create( iImageDecoder->FrameInfo().iOverallSizeInPixels,
                iImageDecoder->FrameInfo().iFrameDisplayMode ); //always fail error code is -34 KErrCouldNotConnect
        TRequestStatus status;
        iImageDecoder->Convert( &status, *iBitmap );
        User::WaitForRequest(status);
    why??
    I need to inherit from CActive to create a CFbsBitmap or I will be failed.
    Last edited by xhsoldier; 2007-10-16 at 10:19.
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

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

    Re: about the thumbnail, a bug??

    it might help if you could share the crash error code ?

    Anyway, would it help if you would use CWsBitmap instead..

    yucca

  3. #3
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: about the thumbnail, a bug??

    Quote Originally Posted by symbianyucca View Post
    it might help if you could share the crash error code ?

    Anyway, would it help if you would use CWsBitmap instead..

    yucca
    I have added the error code -34
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

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

    Re: about the thumbnail, a bug??

    its "Failed to connect", so did you try with CWsBitmap ? The difference is that you need to open RWsSession and use that when constructing the bitmap, othervise it works the same.

    yucca

  5. #5
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: about the thumbnail, a bug??

    Quote Originally Posted by symbianyucca View Post
    its "Failed to connect", so did you try with CWsBitmap ? The difference is that you need to open RWsSession and use that when constructing the bitmap, othervise it works the same.

    yucca
    No, I do not know if the CWsBitmap can fulfill my requirement.
    but when I am using CFbsBitmap in AO, it works. why failed in a CBase drived class. Is it a bug??

    Anyway, I will try CWsBitmap tomorrow.
    thanks
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

  6. #6
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: about the thumbnail, a bug??

    still, the err is -34, can not connect to the font and bitmap server. why?
    only in AO, then it can connect to the font and bitmap server. I will raise a bug at wiki.
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

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

    Re: about the thumbnail, a bug??

    which excat line is giving this error ?
    It's propably a bug in your code, and not in the platform...

    yucca

  8. #8
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: about the thumbnail, a bug??

    Quote Originally Posted by symbianyucca View Post
    which excat line is giving this error ?
    It's propably a bug in your code, and not in the platform...

    yucca
    the red line in my first thread
    call CFbsBitmap::Create()
    the para that I passed in that function is right. but error to create.
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

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

    Re: about the thumbnail, a bug??

    and, I quess you didn't want to listen me and try CWsBitmap ?

    just connect the session before and close it after you have deleted the CWsBitmap bitmap...

    yucca

  10. #10
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: about the thumbnail, a bug??

    Quote Originally Posted by symbianyucca View Post
    and, I quess you didn't want to listen me and try CWsBitmap ?

    just connect the session before and close it after you have deleted the CWsBitmap bitmap...

    yucca
    Hi, I try it this way. but I do not know how to connect.

    Code:
    fileName = _L("c:\\Media files\\image\\fff.JPEG");
    iImageDecoder = CImageDecoder::FileNewL( iFs, fileName );
    iWsBitmap = new (ELeave) CWsBitmap(); 
    err = iWsBitmap->Create( iImageDecoder->FrameInfo().iOverallSizeInPixels,
                iImageDecoder->FrameInfo().iFrameDisplayMode );
    TRequestStatus status;
    iImageDecoder->Convert( &status, *iWsBitmap );
    User::WaitForRequest(status);
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

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

    Re: about the thumbnail, a bug??

    just add RWsSession as member variable, connect it in Construct or before making the bitmap, and close it in the destructor of the class.

    and use the CWsBitmap(RWsSession &aWs); overload on making the bitmap.

    yucca

  12. #12
    Super Contributor
    Join Date
    May 2006
    Location
    Beijing,China
    Posts
    1,190

    Re: about the thumbnail, a bug??

    Quote Originally Posted by symbianyucca View Post
    just add RWsSession as member variable, connect it in Construct or before making the bitmap, and close it in the destructor of the class.

    and use the CWsBitmap(RWsSession &aWs); overload on making the bitmap.

    yucca
    Code:
    fileName = _L("c:\\Media files\\image\\fff.JPEG");
    iImageDecoder = CImageDecoder::FileNewL( iFs, fileName );
    iWsBitmap = new (ELeave) CWsBitmap(iWs); 
    err = iWsBitmap->Create( iImageDecoder->FrameInfo().iOverallSizeInPixels,
                iImageDecoder->FrameInfo().iFrameDisplayMode ); //create success
    TRequestStatus status;
    iImageDecoder->Convert( &status, *iWsBitmap );
    User::WaitForRequest(status);  //no result, why?
    [I][COLOR="Orange"]xhsoldier[/COLOR][/I]
    [email]xhsoldier@gmail.com[/email]/[email]xhsoldier@163.com[/email]

Similar Threads

  1. RecordStore bug on Series 60
    By ncerezo2 in forum Mobile Java General
    Replies: 21
    Last Post: 2009-11-26, 10:12
  2. Serious BUG in Nokia phones!!!
    By bartekn in forum Mobile Java Media (Graphics & Sounds)
    Replies: 10
    Last Post: 2004-03-28, 22:09
  3. A bug: setColor with offscreen graphics - PLEASE, REPLY THIS TIME
    By palmcrust in forum Mobile Java General
    Replies: 11
    Last Post: 2003-12-04, 12:43
  4. Firmware bug or code bug displaying list on 3650
    By blackjack75 in forum Mobile Java General
    Replies: 2
    Last Post: 2003-09-24, 19:52
  5. Replies: 8
    Last Post: 2003-07-11, 12:56

Posting Permissions

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