Discussion Board
Encode picture, what can't view witch FExplorer or other similary app
2004-10-18, 13:08
#1
Regular Contributor
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!
Nokia Developer Expert
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
Regular Contributor
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.
Nokia Developer Expert
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
Regular Contributor
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;
}
Nokia Developer Expert
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
Regular Contributor
Show "System error".
When remove the second line from code, then no error.
CDictionaryFileStore* iniFile=CDictionaryFileStore::OpenLC(fsSession, TXT, KUidShellApp);
Nokia Developer Expert
see this:
http://www.newlc.com/article.php3?id_article=150
Do what they say, and try again.
yucca
Regular Contributor
I'm solve this problem. Thanks
Re: Encode picture, what can't view witch FExplorer or other similary app
2010-03-25, 06:54
#10
Registered User
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
Forum Rules