Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

2版和3版MBM文件的不同

From Wiki
Jump to: navigation, search
Article Metadata

兼容于
平台:
Symbian

文章
r60600 在 23 Dec 2007 创建
最后由 hamishwillee 在 07 May 2013 编辑

一.2版生成MBM文件的方法

一般是在.mmp文件中:
START BITMAP xxx.mbm
HEADER
TARGETPATH \system\apps\xxx
SOURCEPATH ..\gfx
SOURCE c12 qgn_xxx_demo_bmp1.bmp
SOURCE c12 qgn_xxx_demo_bmp2.bmp
SOURCE c12 qgn_xxx_demo_bmp3.bmp
SOURCE c12 qgn_xxx_demo_bmp1_mask.bmp
SOURCE c12 qgn_xxx_demo_bmp2_mask.bmp
SOURCE c12 qgn_xxx_demo_bmp3_mask.bmp
END
则在编译时会生成xxx.mbm文件。

二.3版生成MBM文件的方法
一般是在.mk文件中:
TARGETDIR=$(ZDIR)\RESOURCE\APPS
ICONTARGETFILENAME=$(TARGETDIR)\xxx.mbm
mifconv $(ICONTARGETFILENAME) \
/c12,1 $(ICONDIR)\qgn_xxx_demo_bmp1.bmp /c12,1 $(ICONDIR)\qgn_xxx_demo_bmp2.bmp /c12,1 $(ICONDIR)\c12
qgn_xxx_demo_bmp3.bmp
(这种方法会自动查找主位图相应的作为MASK的位图生成xxx.mbm文件)

以上方法生成的MBM文件除存储位置不同之外,最大的不同在于位图索引。所谓位图索引,就是MBM中一系列位图排列的顺序,也就是创建位图或图标时使用的索引号(iEikonEnv->CreateBitmapL或CEikonEnv::Static()->CreateIconL)。2版是按.mmp文件中START BITMAP定义的顺序;而3版是将查找出的作为MASK的位图紧跟相应的主位图之后。

先来看2版MBM中位图对应的索引:

0 qgn_xxx_demo_bmp1.bmp
1 qgn_xxx_demo_bmp2.bmp
2 qgn_xxx_demo_bmp3.bmp
3 qgn_xxx_demo_bmp1_mask.bmp
4 qgn_xxx_demo_bmp2_mask.bmp
5 qgn_xxx_demo_bmp3_mask.bmp


而3版MBM中位图对应的索引:
0 qgn_xxx_demo_bmp1.bmp
1 qgn_xxx_demo_bmp1_mask.bmp
2 qgn_xxx_demo_bmp2.bmp
3 qgn_xxx_demo_bmp2_mask.bmp
4 qgn_xxx_demo_bmp3.bmp
5 qgn_xxx_demo_bmp3_mask.bmp
(这可以用MBM查看工具mbmviewer.exe打开相应文件加以证明)

当然,在同时适合2版和3版编译的工程中,也可以调整.mmp文件中位图定义的顺序以达到2版和3版位图索引相同的目的。

This page was last modified on 7 May 2013, at 23:59.
268 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×