svg loading problem
| Wed, 2006-04-05 08:55 | |
|
We are doing following: - getting an .svg from somewhere. - running it through svg2svgt software successfully (so the .svg should be ok) - mifconv myapp.mif mysvg.svg - copying myapp.mif to epocroot\epoc32\resource\winscw\udeb\z\resource\apps\ Now, to the application: _LIT(KSVGFilename, "z:\\resource\\apps\\myapp.mif"); iIcon = AknIconUtils::CreateIconL(KSVGFilename, 0); On the last line application just crashes with panic code -1 When using following to load svg: iIcon = new (ELeave) CFbsBitmap; TInt err = iIcon->Load(KSVGFilename, 0); application does not crash but svg is not loaded and the error is -20 (KErrCorrupt) My question is: what is wrong? Tried also to binencode the .svg file but the svgtbinencode.exe application fails to start with "DRMAuthenticated.dll missing" error. Ahti. |
|






Forum posts: 25
did you try to load just .svg files?
Do MediaGallery or FileManager play them?
You may have to load SVG file with ICL framework, see CImageDecoder (it works).
Also you could use AknsUtils::CreateGulIconL() to load from MIF files.
Forum posts: 16
Forum posts: 19
I´m having the same problem. I receive the content of a generated .mif file from our server. I write it to a file and tries to create the icon using AknIconUtils::CreateIconL(bitmap, mask, path to file, 0, 1)
I also get KErrNotFound.
//Henrik
Forum posts: 63
Answer: theses are the identifiers for the bitmap and the mask in the mif-file! usually they come from the .mbg file (enum) this mbg is created during build process of your icons. ... search this .mbg file and see which numbers are standing there! you will find the count doesnt start at 0! It normally starts at somewhere like 3000.
Forum posts: 3
Inside of .mif file indexing starts with 16384 (not with 0 like in .mbm).
When you create .mif file type:
mifconv.exe myapp.mif /hmyapp.mbg /c16,1 mysvg.svg
Inside of .mbg file you can find the enumeration for .mif file content.
Regards,
Mirec
Forum posts: 19
thanx for your answers. Looking in the mbg file manually is not an option cause I´m getting the data from the mif file from our server at runtime.
The solution is to use this function:
AknIconUtils::ValidateLogicalAppIconId(*completeName, bitmapId, maskId);
bitmapId and maskId will now contain the correct indexes.