You Are Here:

Community: Wiki

This page was last modified on 23 December 2007, at 06:01.

2版和3版MBM文件的不同

From Forum Nokia Wiki

一.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版位图索引相同的目的。

Related Wiki Articles

No related wiki articles found

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fwikiE2eforumE2enokiaE2ecomE2findeE78E2ephpE2fE25E455E25A6E2582E25E454E25BE44E2595E25E455E259CE25A8E25E456E2594E25B6E25E454E25BBE25B6E25E457E25AE45E25B1E25E455E2588E259BE25E455E25BBE25BAE25E457E259FE25AE44E25E454E25BFE25A1X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqfntypeZWikiContentQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZseriesE5f60Q qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZtypeQUqfntypeZWikiContentQ qfnZuserE5ftagQSxs60X qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqfntypeZWikiContentQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ