Back to Homepage
Creating EPOC MBM Picture Files
There have been a lot of questions about the new EPOC picture format, many people want to know how they go about creating icons for use on the Psion 5/Geofox-One, either from scratch or by converting old Series 3x icons. Well, this page is here to help! If you're a French speaker, then you may find using a direct translation of this page into French of more use. Thanks very much to Gérald Aubard for taking the time and trouble to do the translation.
First, some background information! Basically, EPOC machines use files with an .MBM extension (instead of .PIC) for its icons. This stands for "Multiple BitMap" file and allows for (as the name suggests) more than one picture to be embedded into one file. An even bigger bonus is the fact that this format uses compression, so you can get lots of pictures into what results as quite a small file. The problem is that not many people are very clear on how to use the system, and that (hopefully) is where this page comes in.
Before you try anything though, you need a Windows '95/Windows NT 4.0 utility called "BMCONV". This is Psion's utility to convert between the PC bitmap file format "BMP" and the EPOC picture file format "MBM". You can download the latest copy of BMCONV.EXE from this page, or an older version can be found on the PsiWin CD that came with your Series 5/5mx, in the \Extras\Utils\ directory. The program works in both directions, so it can also decompile MBM files back into the BMP files which were used to create them. OK, OK, all that has started to sound a bit complex, but using these instructions, it will all become clear!
If you want to work with/manipulate MBM files on your Series 5/5mx/Geofox-One, then I can fully recommend the excellent MBMView program by Lieuwe de Vries. It really is a top tool for all kinds of MBM work on the machine itself! And should you fancy the ability of quickly viewing MBM files under Windows (3.x or '95), you may also like to check out Richard Wakelin's WinPix program.
And as a quick aside, if you are using this page to make icons for a Series 5/5mx/Geofox-One program, then you should check out RMR Software's 'EventDemo' page which offers advice and examples on how to write event driven programs.
These instructions were tweaked and made into a pretty web page by me, but compiled by Andy Waller, who was a great help to me with converting my old JWIN icon to the new MBM format, and who also helped with the toolbar icons in JWIN for EPOC. Please note however, that neither Andy nor I can support this! This page has been set up to impart the knowledge we learned through trial and error, and prevent people mailing either of us asking for help!
Your Starting Picture
You obviously need to have a picture file to start from. You can obtain this through several methods:
- Take an existing Series 3x icon (48x48 pixels in size with a .PIC or .ICO extension), and use PsiWin 1.0 or 1.1 to convert it to a Windows .BMP file.
- Draw a new icon yourself in a drawing program on a Series 3x, and convert as above.
- Draw a new icon in a PC paint package, and save it directly as a Windows .BMP.
- Draw the icon in Sketch and use the Export option to save it as an EPOC picture file. It will be given an .MBM extension so will then need to be copied to a PC and converted back to a Windows .BMP. As you can see, this last method is a bit tortuous!
As the last item above suggests, MBM files can be imported and exported from the Sketch application where they are known as EPOC picture files. However as far as we know, Sketch will only recognise and import the first image in a real multiple image MBM file.
As an aside, pressing Ctrl+Shift+Fn+S on the Series 5/5mx allows you to capture a complete screen image as an MBM file, useful for extracting parts of the screen for use as icons, or if you want to include Series 5/5mx screenshots in web pages or manuals.
Creating a Program Icon
Now you have created your basic icon, you need to prepare it for use with your program.
- The Series 5/5mx uses 3 sizes of icon for the system screen (one for each of the 3 zoom
levels), each of which also has an associated mask. To explain:
- The icons are sized 48x48, 32x32 and 24x24 pixels.
- You can use just one 48x48 icon and let the Series 5/5mx automatically scale the icon to the smaller sizes itself as the screen is zoomed. This may be acceptable for some styles of icon, but it loses resolution.
- The more reliable and recommended method (described below) is to create the 3 sizes of icon yourself from the master and optimise each for the size.
- Each icon must be supplied in 2 forms : the picture and its mask. A 'mask' is just a silhouette of the icon itself, all in black, that allows EPOC to mask out the screen background where the icon is situated. i.e. it lets white areas of the icon stay white. Without the mask they would be transparent and let the background screen colour show through (e.g. the EPOC logo).
- Use a PC paint program (Paint Shop Pro is an extremely good choice, and for its shareware price, very reasonable) to create the required bitmaps from the master icon as follows.
- Make sure the icons are all saved as Windows bitmaps (.BMP), subtype RGB encoded, with 4 bits/pixel and max 16 colours.
- In my JWIN for EPOC program, the icon file has been left with the original 3 colours it had in its Series 3 form - black, white and grey. However, it is possible to add another shade of grey, as 4 colours are routinely used in the Series 5/5mx. Note though, that we haven't always had success with using 4 colours as one grey shade sometimes gets lost in doing the conversion (the reason hasn't yet been tracked down).
- Start by taking the original 48x48 icon and use "Save As" with the name xxxxx48.bmp (xxxxx being any name of your choice). All these names are optional, but this is an efficient system for simplicity and organisation. Basically though, as long as you know what they are called for use in step 11, anything is OK!
- Use this icon (xxxxx48.bmp) and, for all areas enclosed by the outline of the actual icon, fill in with black - i.e. replace all grey and white pixels within the icon and make it into a silhouette. This will be the mask that EPOC requires. Save it as xxxxx48m.bmp. If you're still not sure about what a mask should look like, see the example pictures later on this page.
- Take the xxxxx48.bmp again and resize it to 32x32. Then tweak and touch it up until it looks good again. This is very subjective, but you'll have to lose some detail and simplify it for the smaller size. When done, save it as xxxxx32.bmp.
- Repeat Step 4 on icon xxxxx32.bmp to make its mask and save it as xxxxx32m.bmp.
- Take the xxxxx48.bmp again and resize it to 24x24. Once again, tweak and touch it up until it looks good! When done, save it as xxxxx24.bmp.
- Repeat Step 4 on icon xxxxx24.bmp and save it as xxxxx24m.bmp.
- You should now have 6 bitmap files:
xxxxx24.bmp
xxxxx24m.bmp
xxxxx32.bmp
xxxxx32m.bmp
xxxxx48.bmp
xxxxx48m.bmp
To make things a bit clearer (especially concerning the masks), these images are the ones used to make the program icon for JWIN for EPOC:
| Image\Size | 48x48 | 32x32 | 24x24 |
| Normal Icon |  |  |  |
| Icon Mask |  |  |  |
- Copy the BMCONV.EXE program to this directory (you can delete it again from here after use), or make sure the program is within one of the PATHS specified in your Autoexec.bat file.
- You can run this program by specifying the each of the output and input files on the command line (Tip: execute BMCONV without any parameters to see the usage instructions). However it is easier to use Windows Notepad (or another text editor) to create a simple command file as follows:
xxxxx.mbm
xxxxx24.bmp
xxxxx24m.bmp
xxxxx32.bmp
xxxxx32m.bmp
xxxxx48.bmp
xxxxx48m.bmp
The following points apply to the file you've created:
- The first line xxxxx.mbm is the filename you are going to create for the Series 5/5mx, i.e. the BMCONV output file.
- The next 6 lines are the bitmap icons you've created, and will be the input files for BMCONV.
- It makes sense to list them in the sequence above (24 icon, 24 mask, 32 icon, 32 mask, 48 icon, 48 mask). However, as long as the icons are in pairs, the order should not make any difference to the final file, although this (as of yet) has not been checked.
- A very important thing to note - there must be a carriage return (ENTER) on the last line, such that the cursor moves to the next and last line of the file. The program fails to run without this linefeed.
- Now, save this file as (for example) "MAKE.TXT" in the directory with the icons and BMCONV.
- In Windows '95/NT 4.0, use Start|Programs|MS-DOS Prompt and then in the DOS window navigate to the directory which holds the icons and the text file you created. At the DOS prompt enter:
BMCONV MAKE.TXT
The BMCONV program should then run and tell you the following:
Compiling
Multiple bitmap store type: File store
Psion file: xxxxx.mbm
Bitmap file 1: xxxxx24.bmp
Bitmap file 2: xxxxx24m.bmp
Bitmap file 3: xxxxx36.bmp
Bitmap file 4: xxxxx36m.bmp
Bitmap file 5: xxxxx48.bmp
Bitmap file 6: xxxxx48m.bmp
Success
You should now have a file called xxxxx.mbm in the same directory! If it fails you've probably got a filename wrong.
- To use this new MBM, copy it from your working directory to where you're developing your program (i.e. either a Series 5/5mx machine or the relevant WINS directory). Then, make the relevant call to it in the APP...ENDA section of OPL. This will appear something like:
APP AppName,AppUid&
ICON "C:\CodePath\IconName.mbm"
ENDA
Basically, that's it! Yes, it's quite long winded and it may not even be the right way or the only way, but it works! Please feel free to save this page down to your local disk to reference off-line, so long as you do not copy, quote or re-publish any portion(s) of it without our permission.
Extracting Icons from MBM files
The above instructions deal with icon conversion/creation. However, you will obviously want to create MBM files for toolbars or other uses in your programs. The same principals apply, but here are a few more useful pointers...
- Toolbar icons are 24x24 in size.
- A lot of toolbar icons you may not need to draw from scratch! You could copy one of the ROM application's MBM files to your local disk, to use the pictures it contains - if you don't know how, a very simple OPL program like this will do it (simply enter the path of the MBM file you want manually then re-translate):
PROC CopyFromRom:
COPY "Z:\SYSTEM\APPS\WORD\WORD.MBM","C:\OPL"
PRINT "File copied OK.
GET
ENDP
There is also a far easier way, thanks to a program I mentioned at the top of this page called MBMView by Lieuwe de Vries. This will allow you to view and save any embedded picture from any MBM file (including those on the ROM)!
- Once you have the file on your local disk, copy it to the PC and do a reverse BMCONV to extract the Window bitmaps from the MBM file. You can do this the easy way by creating a file similar to the "MAKE.TXT" example above, only use something like this:
/U WORD.MBM
REV_00.BMP
REV_01.BMP
REV_02.BMP
REV_03.BMP
........ (Insert a new line for every new .BMP here!)
REV_100.BMP
- Save the file as "REV_MBM.TXT" (or whatever you want). Once again, either copy BMCONV.EXE to the directory where the new text file and MBM file are, or make sure the program is in your PATH's. After that, simply run it by typing this at the DOS command prompt:
BMCONV REV_MBM.TXT
That's it! You then end up with the specified number of .BMP files which contain corresponding icons extracted from the multiple MBM file. If BMCONV runs out of MBM's to decompile, it will stop with an error message, but you will find that it has created the .BMP files for all the icons present. There's no way of telling how many .BMP files will be produced, so some trial and error is required - if all 100 files output without BMCONV failing it's probably certain that there are more in the file!
- View all the .BMPs in your PC paint package, or preferably use some sort of "Thumbnail" function (again, Paint Shop Pro comes in very handy here), to find out what they all are.
- Once you've sorted through all the BMP files you've got, and have found some you want to use in your toolbar, you can either use them as is, or modify them to suit your program's purposes. Use exactly the same method as described at the beginning to make one big MBM with them all in.
- You don't actually need to bother creating the silhouette masks for each icon, as they work fairly successfully without. When you load the icons to your toolbar in OPL, just load the same icon index in twice (once as the icon and again as the mask).
- However, better results can be obtained by creating an equivalent silhouette mask for each toolbar icon. This will allow white areas of the icon to stay white, and not be transparent and let the grey background of the buttons show through.
That should get you started on the toolbar front. Please note, as of yet, Psion don't seem to mind people using their icons and obtaining them via the above method. If they do, then we're happy to remove the instructions from this page. Psion, please get in touch if you're not happy with what's been written.
Something else worth pointing out is that when making icons for the toolbar or even when you're combining bigger pictures into one MBM to load from within your program, the order in which you list them in the "MAKE.TXT" file will be the order they appear within the MBM file. The indexing starts from 0, so the gLOADBIT command to load the first icon must point to 0.
One final, useful point to note is that the MBM file holding your program icon does not need to be distributed with your app (its details are stored in the resultant .AIF file which OPL32 generates). However, the MBM that contains your toolbar icons/other program pictures must be distrubuted with your program, and you've got to use gLOADBIT when you want to show the bitmaps/icons it contains.
Well, that's probably about all you need to know, and more importantly, all we can tell you right now! Hopefully, you've found this page to be of use. Once again, everyone owes Andy Waller a BIG "thank you" for his help and clear instructions!.
If there's anything which you feel can be added to this page, if you spot a problem or if you want to quote any part of this page for your own purposes, please contact us. However, please do not go mailing us asking for Andy or myself to draw/create icons for you. We're very sorry, but neither of us have the time to do that. This page gives you all that you need to know to create and store your own icons!
Back to Homepage