HomepagePDA-FX     Free Palm OS Code    HB++ class: clsBitmap24Bit

Description

This HB++™ class has been designed for loading and saving Windows™ bitmaps, coded with uncompressed 24 bit RGB format.

It also ensures the Windows™ bitmaps to HB++™ conversion at runtime.

This class embeds ARM code for very fast loading, saving and conversion.

 

Video

Video showing the saving/loading speed and conversion time comparison between ARM version and standard version.

From the pannel control inside the preview area, choose the video preview (loading speed comparison or saving speed comparison).

 

 

 

Screenshots

preview 1   preview 2

preview 4   preview 3

 

 

Features

  • Loading such bitmaps from a stream or binary resource.
  • Saving such bitmaps to a stream.
  • Preserve mode: avoiding to reload from stream or binary resource the previous loaded bitmap.
  • Fast mode: load and save using ARM code (very fast, only available for OS 5.x + ARM processor based devices).
  • Low resolution mode: this option is used for avoiding loss of pixels for odd dimensions.
  • The LoadBitmap function allows to load a bitmap by index when the stream contains several bitmaps.

 

More details

    If ARM code is not supported by the device that the code is running on, the standard method is automatically called, so there is no crash whatever the device used.

    If you do not want to use ARM code you can disable it at compilation time by commenting the line, in the clsBitmap24bit class file, like this:

    Using ARM code:

      #Const USEARM=TRUE  

     

    Disabling ARM code:

     '#Const USEARM=TRUE  

     

    The ARM code of the clsBitmap24bit class uses a StreamMemory to work. The size of memory space used is depending on the number of line you prefer to convert in one call.

    This is defined by the constant:

      Private const MAXLINESTREAM As Long = 20  

     

    You can change it if you want. More this value is high and faster the job is done.

    I have made a compromise by defining the number of lines equal to 20, that ensures less than 20kb for a 500x500 Windows bitmap.

    This class is provided with a full HB++ sample project.

     

Download

list of all available downloads for this code. (click on image to proceed to download).
Description Size Download
HB++ class, ARM code and full HB++ sample project 770 Kb
Palm OS database including Low and Double resolution bitmaps 600 Kb

 

Contact

For any information or bug report you can contact me: Quagliozzi Eric

 

Homepage: PDA-FX