×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    147

    MBM file on 5th edition

    Hi all,

    I have a mbm file with 6 icons that I created for 3rd edition phones. It works great. Now that I am porting the app to pys60 1.9 and 5th edition I have run into an issue where python can't read the icons inside the mbm.

    I tested it with view_mbm and it works on 3rd edition just fine (show 6 icons with 6 masks), but running on 5th edition view_mbm only shows 2 empty icons. What gives? Did the mbm format change between 5th and 3rd editions?

    Can anybody shed some light onto it?

    Raf

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: MBM file on 5th edition

    Quote Originally Posted by raf1hh View Post
    Hi all,

    I have a mbm file with 6 icons that I created for 3rd edition phones. It works great. Now that I am porting the app to pys60 1.9 and 5th edition I have run into an issue where python can't read the icons inside the mbm.

    I tested it with view_mbm and it works on 3rd edition just fine (show 6 icons with 6 masks), but running on 5th edition view_mbm only shows 2 empty icons. What gives? Did the mbm format change between 5th and 3rd editions?

    Can anybody shed some light onto it?

    Raf
    hello raf

    can't help you much but i thik this test code from jouni can help you.

    Regards
    Gaba88

  3. #3
    Super Contributor
    Join Date
    Nov 2007
    Location
    Sertaozinho/Brazil
    Posts
    768

    Re: MBM file on 5th edition

    Quote Originally Posted by raf1hh View Post
    Hi all,

    Can anybody shed some light onto it?

    Raf
    I had a problem with mif files, very close to what you saying. When I used absolute indexes I had problems (even they used to work in Python 1.4.5). After using relative indexes the icons were loaded (Python 1.9.5). In my case, mbg file provided indexes 16384 and 16386 and I used use 0 and 2 (offsets for first index 16384).

  4. #4
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    147

    Re: MBM file on 5th edition

    This is getting really frustrating.

    I recreated the mbm file from scratch with Carbide C++ 2.0. Carbide created the mbg file for me. All bitmaps are c24 format, all bitmaps have a corresponding image mask yet I still can't get it to work.

    In my own test script I get KErrNotFound when trying to create the Listbox (sample below)
    Code:
    import appuifw
    import e32
    
    exitlock = e32.Ao_lock()
    
    def exit_handler():
        exitlock.signal()
    
    appuifw.app.menu = [(u"Exit", exit_handler)]
    appuifw.app.exit_key_handler = exit_handler
    
    entries = []
    mbm = unicode("e:\\data\\python\\vm2.mbm")
    icon = appuifw.Icon( mbm ,2,3)
    #icon = appuifw.Icon(u"z:\\resource\\apps\\avkon2.mbm", 28, 29)
    
    entries.append((u"Test1",icon))
    
    appuifw.app.body = appuifw.Listbox(entries)
    
    exitlock.wait()
    In view_mbm I get a message: "Failed to show 12 icons".

    A couple of things:

    1. the mbg file created by carbide does NOT contain index offsets and is different in format than the avkon.bmg file
    2. the generated mbm file can be opened and all icons view correctly in MBM Whizard and in Carbide 2.0

    I have no idea how to take it from here. How is everybody else generating their mbm files and are they working with 1.9.5?

    raf

  5. #5
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    147

    Re: MBM file on 5th edition

    Maybe the issue is with user made mbm files as this application also exhibits the issue:

    http://jouni.miettunen.googlepages.com/flagicon48

  6. #6
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    147

    Re: MBM file on 5th edition

    I have tested a couple more user generated mbm files and scripts (from around the web) and they all fail with the same issue. At this point I think this might be a bug in 1.9.5.

  7. #7
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: MBM file on 5th edition

    Quote Originally Posted by raf1hh View Post
    Maybe the issue is with user made mbm files as this application also exhibits the issue:

    http://jouni.miettunen.googlepages.com/flagicon48
    What kind of problem did you have with FlagIcon48? I'm not sure, but I recall I did run it with 5800 and saw correct icons. It's just that scrollbar didn't exist in the used PyS60 (1.9.4?) version. Since I created the used MBM myself and wrote the code, I have some motivation to fix possible defects

    In general I agree, there is something weird with MBM and MIF file support. On the other hand there are several versions of MBM and MIF, it's not just one single file format(s).

    Curious,

    --jouni back from midsummer forest, covered by smoke and mosquito bites

  8. #8
    Regular Contributor
    Join Date
    Nov 2007
    Posts
    147

    Re: MBM file on 5th edition

    Flag48 will not run and errors out with KErrNotFound on N97 and the N97 SDK. It errors out during the Listbox create call.

    And yes, you are absolutely right, some mbm files work, but we as users only have a single way to create mbm files (through bmvonvert or any tools that use bmconvert) and files created with bmconvert do not work for me. Thats the reason I was asking if somebody could try it with mbm files they have created and see if it works for them.

    So far I have tried three different user created mbm files (one of them was flag48) and all of them fail for me. At this point unless somebody can actually verify that this works for them I will file a bug report on this.

    Raf

  9. #9
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: MBM file on 5th edition

    Quote Originally Posted by raf1hh View Post
    some mbm files work, but we as users only have a single way to create mbm files (through bmvonvert or any tools that use bmconvert) and files created with bmconvert do not work for me.
    There is not a single MBM file format, but about 4. Just check bmconv command line parameters. All file sizes are different, so I presume the default is different than anything else.. Additinally you can play with palette, which might duplicate those 4 to 8 different file format variants

    BMCONV version 112.
    Symbian OS multiple bitmap file/rom store conversion program.
    Copyright (c) 1998-2001 Symbian Ltd. All rights reserved.

    Usage:
    BMCONV [/r|/s|/n] [/hfilename] [/q] [/pfilename] epocfile [OPT]bmp_1 ... [OPT]bmp_n
    BMCONV [/r|/s|/n] [/q] [/pfilename] epocfile /mepocfile2
    BMCONV /u epocfile bmp_1 [... bmp_n]
    BMCONV /v epocfile
    BMCONV commandfile

    /r specifies a ROM image destination file,
    /s specifies a compressed ROM image file,
    /n disables bitmap File Store compression,
    the default is a compressed File Store file.
    Quote Originally Posted by raf1hh View Post
    unless somebody can actually verify that this works for them I will file a bug report on this.
    Please file a bug report right away.

    Some additional info: PyS60 1.9.5 running in S60 3.1 emulator failed with all 4 image files. PyS60 1.4.5 running in S60 3.1 emulator loaded default and non-compressed files, but failed with ROM image and compressed ROM image files. Since the default options create smallest file (433kB vs 1.6MB) I would recommend support for default MBM image files should be highest priority, while the others are nice to have, but not absolutely necessary.

    Cheers,

    --jouni

Similar Threads

  1. Regarding BMCONV
    By sanah007 in forum Symbian
    Replies: 2
    Last Post: 2009-05-26, 12:47
  2. Problem with GCCE build in Carbide.vs
    By raffaelbechara in forum Symbian
    Replies: 6
    Last Post: 2008-10-20, 16:06
  3. Replies: 2
    Last Post: 2008-09-02, 14:27
  4. problem when importing from carbide c++ to vs 2003!
    By misfit.physics in forum Symbian Tools & SDKs
    Replies: 12
    Last Post: 2008-02-19, 09:45
  5. Nokia Image Converter
    By davidpurdie in forum General Development Questions
    Replies: 0
    Last Post: 2004-02-18, 15:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •