×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Regular Contributor
    Join Date
    Jun 2004
    Location
    Lithuania
    Posts
    63

    Encode picture, what can't view witch FExplorer or other similary app

    Hello members,
    I’m have picture in *.mbm file. This file can view with FExplorer application. I want made, what cannot view this picture with FExplorer or other explorer’s applications. Any idea how to resolve this? The picture optional can be in *.mbm file.

    Thank in advance!

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,170
    one easy solution would be to put the image into the dictionary store. Would not increase the size of the application, and also very easy to use.

    yucca

  3. #3
    Regular Contributor
    Join Date
    Jun 2004
    Location
    Lithuania
    Posts
    63
    Thanks for answer, but I'm have another question. How I can to put the image into the dictionary store? Which calss need to use.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,170
    Here's is how to get it out:

    CFbsBitmap* CMyAppUi::BitMapL(TInt aIndex, CDictionaryFileStore* aDStore)
    {
    TUid FileUid = {0x0};
    FileUid.iUid = aIndex;

    CFbsBitmap* Bitmap = new(ELeave)CFbsBitmap();
    CleanupStack::PushL(Bitmap);

    RDictionaryReadStream in;
    in.OpenLC(*aDStore,FileUid);
    Bitmap->InternalizeL(in);
    CleanupStack::PopAndDestroy(&in);

    CleanupStack::Pop(Bitmap); // Bitmap
    return Bitmap;
    }

    I'm sure you can figure out the putting the image there part with SDK help docs.

    yucca

  5. #5
    Regular Contributor
    Join Date
    Jun 2004
    Location
    Lithuania
    Posts
    63
    Hello yucca,
    With the second code try to create CdictionaryFileStore pointer and get CfbsBitmap with yours function BitMapL(). But in function GetBmpFromFile() is error. Maybe you can check it, please.

    _LIT(TXT, "\\System\\Apps\\My\\x.txt");
    const TUid KUidMyApp = {0x04E84B62};

    CFbsBitmap* CMyContainer::GetBmpFromFile(){
    RFs fsSession;
    User::LeaveIfError(fsSession.Connect());
    CFbsBitmap* Bitmap = new(ELeave)CFbsBitmap();
    CDictionaryFileStore* iniFile=CDictionaryFileStore::OpenLC(fsSession, TXT, KUidShellApp);
    Bitmap = BitMapL(KUidMyApp, iniFile);
    CleanupStack::PopAndDestroy(); // iniFile
    fsSession.Close();
    return Bitmap;
    }

  6. #6
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,170
    what is the error ?

    Anyway, I would at least feel lot more safe using full paths that would also include drive letter.. just in case.

    yucca

  7. #7
    Regular Contributor
    Join Date
    Jun 2004
    Location
    Lithuania
    Posts
    63
    Show "System error".
    When remove the second line from code, then no error.
    CDictionaryFileStore* iniFile=CDictionaryFileStore::OpenLC(fsSession, TXT, KUidShellApp);

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,170
    see this:

    http://www.newlc.com/article.php3?id_article=150

    Do what they say, and try again.

    yucca

  9. #9
    Regular Contributor
    Join Date
    Jun 2004
    Location
    Lithuania
    Posts
    63
    I'm solve this problem. Thanks

  10. #10
    Registered User
    Join Date
    Mar 2010
    Posts
    11

    Re: Encode picture, what can't view witch FExplorer or other similary app

    hai genious.....i m symbian developer....how to disply the image one by one in same container...

Posting Permissions

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