svg loading problem

Login to reply to this topic.
Wed, 2006-04-05 08:55
Joined: 2005-02-21
Forum posts: 47

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.

Wed, 2006-04-05 09:41
Joined: 2006-01-23
Forum posts: 25
Re: svg loading problem
Moi Ahti,

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.
Fri, 2006-04-07 07:19
Joined: 2003-10-17
Forum posts: 16
Re: svg loading problem
I got the same "DRMAuthenticated.dll missing" error with 3rd edition, use svgtbinencode.exe from the fp3 sdk, it should work.
Wed, 2006-05-10 18:33
Joined: 2005-07-04
Forum posts: 19
Re: svg loading problem
Did you guys find a solution to this?

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
Fri, 2006-05-19 13:05
Joined: 2005-11-16
Forum posts: 63
Re: svg loading problem
Do you know what the 0 an 1 does at the end of your statement?

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.

Wed, 2006-05-31 15:32
Joined: 2006-03-22
Forum posts: 3
Re: svg loading problem
Hi.
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
Thu, 2006-08-17 14:53
Joined: 2005-07-04
Forum posts: 19
Re: svg loading problem
Hi,

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.
  • Login to reply to this topic.