×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Nov 2003
    Posts
    145

    Loading JPEG file in CFbsBitmap object

    hi all,

    can I load .jpg file in CFbsBitmap object ? I am using CFbsBitmap::Load function to load the file from a local folder. It gives me error no. "-20" (corrupt). Error no. -20 appears if refer a file that has been scaled and saved and -25 is shown otherwise.

    following is my code
    ////////////////////////////////////////////

    _LIT(KFile, "c:\\System\\Apps\\ICM\\data\\Images\\icons\\0.jpg");
    TInt err;
    err = iJpeg->Load( KFile ); //iJpeg is global variable
    TBuf<16> buf;
    buf.Format( _L("%d"), err );
    iEikonEnv->InfoMsg (buf);
    if (iJpeg)
    {
    gc.BitBlt(TPoint(0,30), iJpeg);
    }
    ///////////////////////////////////////////////

    regards
    dotc

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165
    SDK docs says for load : "Loads a specific bitmap from a multi-bitmap file.", and jpg is not a multi bitmap file, so basically it only works with mbm files.

    check SDK docs for image decoders (OS 7.0) or image to bitmap converters (OS 6.1)

    yucca

  3. #3
    Regular Contributor
    Join Date
    Nov 2003
    Posts
    145
    yucca, you are right. Basically they (images or icons created after scaling) have to be decoded back to make them display on screen.

    dotcdotc

Posting Permissions

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