Image Tool

This is intended for a 128x64 Graphic display, it will convert a BMP file into a format that can be sent to the display via a serial or I2C link. It will also create a header file for use with ByPic or C programs.

Image Tool

The image tool will convert 24 bit BMP files to a series of numbers that can be sent to the device to display that image. The numbers are intended to be used as part of a program, in a C header file for example.

Although the original image should be a 24 bit colour image format or course only black an white are used. To use an existing image, convert the image to TWO colours and then convert it back again. As an example of converting a logo

Original Logo

Decrease colour depth to 1 bit(2 colours)
 

Increase back up again to 24 bit

Negative image

This may seem a bit bizarre but the original conversion program was meant for colour displays. A negative image also works best.

Command line

The tool is a Python program and so will work across all platforms, if Python (2.7) is installed then the command is:

python bmpcf.py <filename.bmp> <hx> <b or c>

<hx> setting this to 0 will give a decimal output and 1 will give a hex output.

<b or c> setting this to c will give an output for use in a C header file, setting to b will give an output for ByPic as a constant.

The output may require some minor adjustments to make them work, there may be an extra comma at the end for the file for example.

Windows GUI Utility

Linux: python gUtil.py
Windows double click on the gUtil.exe, no need to install

This will only accept BMP files. The output can either be in decimal or hex format. The resulting output may need slight modification depending on the system used. For example a .h file for the Arduino may need the 'char' qualifier changing to uint8_t.

Example

The example show how to download this image on to the display and also using the command line utility. The example is for Windows, however the exe files have been generated form Python files so any machine that runs Python will run the script.

  1. Unzip the example file into a directory
  2. Create a bin file from the supplied BMP file if it does not already exist. we will be using 128x64.bin as shown above.
  3. Open a command window and type

bv4612Cmd com2 3 128x64.bin 0 0

The picture will appear on the lcd screen. The same command line utility can also be used for sending and receiving key presses. See the associated 'bv4612Cmd.py' for how this works