关于Symbian里面的mifconv

简单的说,mifconv是symbian提供的一个图像压缩打包工具,用于将svg/bmp格式的多个源文件合成一个mif/mbm复合文件。关于mifconv的更多介绍可参考相关文档,这里我这要介绍下它的用法。

 

通过命令行可看到mifconv的参数信息如下:

mifconv

Multi Icon File converter tool. Version 1.11 (Build 50, SVG stand-alone)
Copyright (c) 2001-2008 Nokia Corporation. All rights reserved.

Usage:

MIFCONV miffile.MIF
        [/Hheaderfile.MBG]
        [/E]
        [/Ppalettefile]
        [/Ttemppath]
        [/Bbmconvpath]
        [/Ssvgencodepath]
        [/Vsvgtversion]
        [/Fparametername.txt]
        [/A] [/OPT] iconsource1.EXT [ ... [/A] [/OPT] iconsourceN.EXT]

 /Hheaderfile.MBG specifies output header file name

 /E               specifies that source icons are only loaded with given file
                  extensions. By default, MifConv prefers source icons with
                  extension .SVG over .BMP, regardless of which is given as
                  a parameter.
 /Ppalettefile    palette parameter, which is forwarded to BMCONV for
                  bitmap icons. See more details in BMCONV help.

 /Ttemppath       specifies the location of temporary files.

 /Bbmconvpath     specifies the location path of BMCONV.exe.

 /Ssvgencodepath  specifies the location path of SVGTBINENCODE.exe.

 /Vsvgversion     specifies the format version of the generated SVGB binary
                  code by SVGTBINENCODE.exe.
                  svgversion may be one of the following values:
                      1 - original encoding for 3.0 and 3.1 (BGR/float)
                      2 - encoding (BGR/fixed point)
                      3 - optimized encoding for 3.1 only (RGB/fixed pt)
                      4 - encoding (RGB/float)

 /A                specifies animated flag for icon

 /OPT              specifies icon framebuffer depth and mask depth and
                                       the syntax is DEPTH[ ,MASK]
 DEPTH             may be one of /1,/2,/4,/8,/c4,/c8,/c12,/c16,/c24,/c32
 MASK              may be one of 1,8

 EXT               may be one of SVG, BMP

 Parameter file defined with option /F may contain
 any of the parameters listed above, separated by spaces or newlines.

 

上面的英文相比大家都能看懂。

 

下面我们看一个具体的使用mifconv例子:

//your_makeimage.mk

ifeq (WINS,$(findstring WINS, $(PLATFORM)))
ZDIR=$(EPOCROOT)epoc32/release/$(PLATFORM)/$(CFG)/Z
else
ZDIR=$(EPOCROOT)epoc32/data/z
endif

TARGETDIR=$(ZDIR)/resource/apps
ICONTARGETFILENAME=$(TARGETDIR)/youtimage_res.mbm  ;你的合成后的图片资源文件名,以mbm结尾

HEADERDIR=$(EPOCROOT)epoc32/include
HEADERFILENAME=$(HEADERDIR)/youtimage_res.mbg       ;include下面的头文件名

ICONDIR=../gfx

do_nothing :
    @rem do_nothing

MAKMAKE : do_nothing

BLD : do_nothing

CLEAN : do_nothing

LIB : do_nothing

CLEANLIB : do_nothing

RESOURCE :   
    mifconv $(ICONTARGETFILENAME) /H$(HEADERFILENAME) /FImages.miflist ;/F后面是资源列表文件名
       
FREEZE : do_nothing

SAVESPACE : do_nothing

RELEASABLES :
    @echo $(HEADERFILENAME)&& /
    @echo $(ICONTARGETFILENAME) /
    @echo $(OTHERICONTARGETFILENAME)

FINAL : do_nothing

 

//看下Images.miflist里面的写法和格式

/c16,1 ../gfx/icon_rectangle_pressed_38x38.svg
/c16,1 ../gfx/icon_rectangle_unpressed_38x38.svg
/c16,1 ../gfx/icon_undo_pressed_38x38.svg
/c16,1 ../gfx/icon_undo_unpressed_38x38.svg
/c16,1 ../gfx/Mobile_splashscreen.bmp    //如果是bmp的图,并且使用mask参数的话,必须有*_mask.bmp存在(此处*代表Mobile_splashscreen)。

......

 

最后在pkg里面打包的时候别忘了把youtimage_res.mbm和youtimage_res.mif都打进去,否则有些资源会找不到.

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值