iconMbmBind [ close ]

================================================================================
MbmBind.opo: An OPL program for binding/dividing MBM file.
Version 1.12 (29 May 2009)

Noriyuki Mihashi
================================================================================


[Contents]
    1. Summary
    2. System requiment
    3. Usage
    4. Exported functions
    5. Note
    6. Licences
    7. Changes history


1. Summary
   This program is an simple utility for binding or deviding multi bitmap (MBM)
   files. It has some features for handling MBM file like following:

     - Binding single bitmaps into one MBM file.
     - Dividing a MBM file to single bitmap files.
     - Simple viewer that shows each bitmaps in a MBM file.
     - Exporting several functions for binding or dividing MBM files as OPL
       module.


2. System requirement
   This program works on following these michines:
     - Psion Series 5
     - Psion Series 5mx
     - Revo


3. Usage
   3.1. Running as a stand-alone OPL program.
     Tap this program then it shows a dialog for selecting operation. There you
     can select following these operations:

       [Bind] button:    Binding single bitmaps into a MBM file.
       [Divide] button:  Dividing a MBM file to single bitmap files.
       [Show] button:    Simple MBM image viewer.

     Single bitmap files divided from a MBM file is named to like this:
         {Source filename}.{Index}.mbm
     For example, if a source multi bitmap file has a name "Sample.pic", then
     single bitmap files divided are named to "Sample.0.mbm", "Sample.1.mbm",...
     Otherwise, if you want to create multi bitmap file "Sample.pic", you have
     to prepare source single bitmap files that have sequentialy numbered name
     like "Sample.0.mbm",...  This program searches files which has numbered
     name like "Sample.x.mbm" and bind them sequentialy into new MBM file.

   3.2. Using as an OPL module.
     This program can export several functions for binding or dividing MBM
     files if it was loaded as an OPL module by "LOADM" command from other OPL
     programs. Functions exported are declared in headder file "MbmBind.oph".
     Details about them are explained in next chapter.


4. Exported functions
   These three functions can be used from other OPL programs.

   PMbVersion%:
     It returns version number. $110 means "Version 1.10".

   PMbBindMbm%:(aDestFile$)
     It binds single bitmap files into a new multi bitmap file. It searches and
     binds the source files which have "{Filename}.{Index}.mbm" style name from
     the same directory where the destination file will be created. File type of
     the source files must be Psion's standard bitmap image called as "MBM".
     Argument "aDestFile$" is file path of the new MBM file to be created. It
     returns number of single bitmaps binded if it successed to create a new MBM
     file. A value zero is returned if it failed.

   PMbDivideMbm%:(aSrcFile$)
     It divides multi bitmap files to single bitmap files. Single bitmap files
     are extracted to the same directory where the source file exists, and they
     have "{Filename}.{Index}.mbm" style name. File type of the source file must
     be Psion's standard bitmap image called as "MBM".
     Argument "aSrcFile$" is file path of the source MBM file. It returns number
     of single bitmaps extracted from source MBM file. A value zero is returned
     if it failed.

   PMbDevideMbm%:(aSrcFile$)
     It works as equal to PMbDivideMbm%:. For correcting wrong spell 'Devide',
     a new function PMbDivideMbm%: was added, and this function was remained
     for compatibilty.


5. Note
   5.1. This program does not support color bitmaps.

   5.2  Maximum single bitmaps that this program can handle is up to 64.


6. Licences
   6.1. The copyright of this program and other related products distributed
        together (source codes, documents, etc.) belongs to the author of this
        program.

   6.2. This program is distributed as freeware by the copyrighter. There needs
        no payment to use it whichever for commercial or noncommercial.

   6.3. The author of this program accepts no claims for physical, mental,
        material, monetary, social, religious, political or any kind of damages
        brought on you through using this program. Anyone who use this program
        must abandon its claims for all damages described above.

   6.4. Anyone who got this program can reuse a whole or part of its soure code
        for own products and can redistribute them whichever for commercial or
        noncommercial without permission of the copyrighter.

   6.5. Anyone who makes own products by reusing source code of this program 
        must not prevent the other people from any rights about this program:
        free distribution, free use, free redistribution and free reuse.

   6.6. It regards that you agreed to all articles listed above in this chapter
        when you use this program or reuse source code of it.


7. Changes history
   Ver.1.00 (1 Jun 2002):
      - Released.

   Ver.1.10 (16 Nov 2004):
      - Improved dialogs for selecting MBM file to keeping selected file path
        until program terminated.
      - Improved dialogs for selecting operations to returning back if operation
        was cancelled.
      - Added several procedures for exporting as OPM functions.

   Ver.1.11 (4 Nov 2008):
      - Improved dialogs for selecting operations to returning back in any case.

   Ver.1.12 (29 May 2009):
      - Fixed bug that MBM files not closed when dividing.
      - Corrected wrong spell of 'devide' to 'divide'.
      - Added new function PMbDivideMbm%: for correcting wrong spell.