Author Archives: Bernie

GLCD Font Output formats : Raw or Struct

Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems.

GLCD Font Output formats : Raw or Struct

Standard Edition, Update V3.7c

From release V2.4d , you can choose between two types of font data output, bitmaps in a raw data array or a C tfont structure

Check (raw) or uncheck (struct) the raw/-struct checkbox in the configuration settings panel

Version 3.7 +

bitmap2lcd-font-data-structure

C language tfont structure in stuct font output mode :

typedef struct {
long int code;
const tImage *image;
} tChar;
typedef struct {
int length;
const tChar *chars;
} tFont;


Previous Versions :

Version 3.0 +

Bitmap2lcd Font Settings

 

 

Before Version 3.0 +

Bitmap2LCD Configuration Settings Raw Struct

 

 

Export Graphic Picture to Data array – Split Data in two parts in height

Export Graphic to Data array – Split Data in two parts in height

The export of the graphic inside the Work Canvas can be exported in two data arrays. The Height is split into two parts.

This only works in one of the horizontal data direction schemes, see red arrows below.

Bitmap2lcd Splitted GLCD Data Direction

In the export Dialog below, there are two options (blue arrow) to export only the Upper or only the Lower half of the work canvas to a data array. In the example below, Upper half are all white pixels and Lower half are all black pixels.

Bitmap2lcd Splitted GLCD

Once one of the upper half or the lower half data array has been exported, the filename must be manually modified in the dialog for example to Newbitmap_Upper or to Newbitmap_Lower to have two separate files inside the folder for the two GLCD halves.(orange arrow)

The variables names in the files are already different, if it’s an upper or a lower part data array (green arrow)

Bitmap2lcd Splitted GLCD Filename

Work Canvas Subdivisions

Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems and a programmable graphic and text processing tool.

Work Canvas Subdivisions

Update V3.7c

There’s a feature to split the Work Canvas in fixed parts ( subdivisions ) located in the Work Canvas main menu ( green arrow )

How to Define a Subdivision :

  1. Subdivision Menu item : Open / Create Work Canvas Subdivisions ( green arrow )
  2. Draw an area in the work Canvas with the mouse
  3. Make a Subdivision with the area ( blue arrow )

bitmap2lcd-work-canvas-subdivisions

Note: The subdivisions must fit inside the paging scheme lines , the horizontal or vertical red lines.

bitmap2lcd-work-canvas-subdivisions_2

When all needed subdivisions were defined, quit the subdivision creating mode ( red arrow )

A set of subdivisions is attached to the current project name. They are saved and reloaded automatically.

To delete a Subdivision, select the area in the Work Canvas and press delete.

These Work Canvas Subdivisions can separately be exported to data arrays (see example below)

bitmap2lcd-work-canvas-subdivisions_3

 

Import a Unicode Character into Work Canvas

Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems.

Import a Unicode Character into Work Canvas exportcharw

Update V3.7c

  • Open then Font Panel and select a Unicode Font, here for example Greek
  • Create a text frame and mouse click at top left text location in the work Canvas -> a red frame area appears (see red arrow)
  • Select a char in the Font Panel grid (yellow Arrow) and click the export button exportcharw (black arrow) OR  double-click on the char in the Font Panel grid (yellow Arrow)
  • When finished, move the Text frame to its location , and Paste paste the Text Area with keyboard key Enter or the Paste button.

bitmap2lcd-export-unicode-to-canvas

 

Bitmap2LCD : Translations of the Tutorials

Bitmap2lcd_Tutorial_Translation

In Google Chrome, you can translate the displayed web page easily (blue arrow)

Install Plugin / Add-on

In FIREFOX , you can install a plugin and translate like this :

Google Translator for Firefox (blue arrow)

or Translator (red arrow)

translation web page in firefox

https://addons.mozilla.org/en-US/firefox/addon/google-translator-for-firefox/

Bitmap2lcd : Dithering and Color Reduction

Dithering and Color Reduction

Bitmap2LCD is a software tool for programming small Graphic LCDs in embedded systems and a programmable text and graphic processing tool.

Update 4.7b

List of Dithering Algorithms in Bitmap2LCD

Conversion of a color image to monochrome with Dithering Algorithms :

Floyd Steinberg, Nearest Color, Stucki, JaNuNi, Steve Arche, Sierra, Burkes.

About Dithering Algorithms

A graphic placed on the FLOATING SELECTION LAYER can be dithered form the main menu item Convert To

The conversion of an imported color graphic to black and white can be started by the DITHERING button (green arrow) :

bitmap2lcd-dithering-conversion

>.<

Bitmap2LCD Appearance, Windows and Styles

Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems.

Bitmap2LCD Appearance, Windows and Styles

Update V3.7c

The program is a “floating windows application” and supports dual screen

bitmap2lcd-windows-managment

Then you can also choose between the skins called “Original Windows Style” or “Modern Style

You can choose your favorite Windows skin at the top of the Windows Main Menu (blue arrow) which will only be effective at the next application launch.

bitmap2lcd-skin-and-styles

Bitmap2LCD supports dual monitors, and sometimes a window can be entirely hidden or located somewhere on the secundary window or even outside the monitor surfaces. You can bring back “home” (on the main screen) a window by clicking the dedicated menu items.

 

 

Full Size or Partial Conversion of the Graphic in Work Canvas

Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems and a programmable graphic and text processing tool.

Full Size or Partial Conversion of the Graphic in Work Canvas

Update V3.7c

Auto-framing (effective bitmap size) : The tool automatically builds a frame around the bitmap located inside the work canvas and converts only the pixels inside it to data.

This frame is built around the effective bitmap by ignoring all the pixels around that are  considered as being in “background” color pixel. The background color is defined by the pixel color at X0 and Y 0 , at the top left corner.

The frame takes into account the number of pixels per byte ( In monochrome mode for example a multiple of 8 in height or in Width, this depends of the data direction )

Bitmap Size Descriptors : If checked, at the end of the data array in the Text Editor , you will find descriptors with height and Width of the converted bitmap.

Bitmap Coordinates Descriptors : If checked, at the end of the data array in the Text Editor , you will find descriptors with X coordinate and Y coordinate of the converted bitmap, the coordinates of the top left corner. If checked, the Auto Framing processing is bidirectional. If unchecked, the Auto Framing processing will only be made in one direction.

Find these options in the configuration panel (blue arrow) Data syntax Tab (green arrow) in the Bitmap Conversion Options Group (red arrow)

bitmap2lcd-framing-settings

Options when running a conversion of the graphic in the Work Canvas :

You can opt for an effective Bitmap Size (auto-framing) ( green arrow ) or for a conversion of the full size canvas or of a manually selected area of the Work Canvas ( red arrow )

In the case of a manually selected area, you have then to select the area with the mouse along the paging scheme guide lines.

bitmap2lcd-framing-settings_2

 

More about partial conversion here

 

Intel Hex Data Output

Intel Hex Data Output (memory map)

Update V4.0

Intel HEX is a file format that conveys binary information in ASCII text form. It is commonly used for programming microcontrollers, EPROMs, and other types of programmable logic devices.  ( Source : About Intel Hex )

In the Output + Settings menu , there’s a new item, for the image inside the Work Canvas to be exported to Data as Intel Hex Files. (blue arrow)

There are several options located in the Start Conversion dialog to change the Intel Hex format.

bitmap2lcd_Intel_Hex_Generated

Save and reload a Vector Script

Bitmap2LCD is a tool for programming small Graphic LCDs in embedded systems and a programmable graphic and text processing tool.

Save and reload a Vector Script

Enter Vector Mode with button  vecto2

In the following example, a circle/ellipse and a rectangle were drawn inside the work canvas and the vectors were exported form canvas to script with the Addvect button

bitmap2lcd vector mode save and reload_1

Save the script to disk (blue arrow)

A vector script is saved to a file having a .B2L extension

 

Reload a Vector Script

In the Graphics Library Folder ( red Arrow ), click on the B2L file ( blue Arrow )

> Use the Files Filters ( Green Arrow ) if necessary

bitmap2lcd Save and Reload Vector Script

The Vector Script is loaded inside the script editor.

Run script Runvect to draw the the vectors inside the work canvas.

See also this article !