Category Archives: Help topics about Bitmap2LCD

Bitmap2lcd : About Work Canvas and Color Depth

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

About Work Canvas and Color Depth

Update V4.7b

The WORK CANVAS is a monochrome, grayscale or color graphic editor.

Color Depth of the canvas (number of colors) is selected in the Configuration Settings.

The COLOR PICKER adapts to the color depth setting (blue arrow).

Example : in 4096 colors mode, the picked color will be the nearest color found in the internal default or custom 4096 colors palette. There are color palettes for 8, 16, 256, 4096, 65535, 262k Colors (green arrow).

At import of a color graphic into the WORK CANVAS, a conversion to the defined color depth palette of 8, 16, 256, 4096, 65535 or 262k Colors is performed.

Color Palettes

Default and Custom Color Palettes can be managed in the main menu Color Palette .

>.<

Displaying Dynamic Analog Numbers

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

Displaying Dynamic Analog Numbers or Floating Point Numbers

The panel of parameters to show dynamic numbers is located In the extended part of the Work Canvas (blue arrow)

This feature can be used to simulate LCD panel designs with variable numbers, instead of leaving a blank area where a dynamic number will later be programmatically displayed on the target hardware.

In the Analog Dynamic Value Panel (red arrow) You can define the X and Y coordinates, the Min and Max value, the value to display and choose between several decimal representation options.

The number (green arrow) can be shown / hidden and its value changed using a Trackbar. The Font, font Size and font style can be defined in the Font Panel.

 

Bitmap2lcd Dynamic Analog Numbers

 

Code example : Displaying a bitmap on Graphic LCD

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

Code example : Displaying a bitmap on a Graphic LCD

Example for an Atmel AVR Microcontroller + a monochrome 128 x 64 Dot Matrix GLCD + using a KS0108 GLCD Controller Library.

 

#include <avr/io.h>
#include “C:\Users\BE\GLCD Lib\KS0108.c”
#include “C:\Users\BE\GLCD Lib\KS0108-AVR.c”
#include “C:\Users\BE\Documents\Bitmap2LCD Project\Output Files\NewBitmap.h”
void LoadBitmap(const uint8_t *bitmap)
{
uint8_t i, j;
for(i=0; i<64; i+=8)
for(j=0; j<128; j++)
{
GLCD_GoTo(j, i);
GLCD_WriteData(pgm_read_byte(bitmap++));
}
}
int main(void)
{
while(1)
{
LoadBitmap(NewBitmap);
}
}

 

Newbitmap.h

The 128 x 64 pixels bitmap converted to data array

#include <avr/pgmspace.h>
 
 const uint8_t  NewBitmap [] = {
 
 0x20 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x02,
 0x10 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x04,
…  Bitmap 1024 Data bytes in Total
0x80 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00,
 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00
};

 

Switching OFF the Internal Web Browser

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

Switching OFF the Internal Web Browser

From Version V2.8H (B2) the internal Help Web Browser (blue arrow) , to access to the online tutorials can be enabled or disabled (red Arrow) in the configuration panel (green arrows)

Of course, you can use your own favorite web browser to access the help topics and tutorials !

Please note that this feature needs to have the Microsoft Internet Explorer installed on the computer. It’s for Bitmap2LCD’s internal use. In case IE can’t be found, the internal Help Web browser will permanently be switched OFF.

bitmap2lcd Internal Web Browser Disable

Bitmap2LCD : About the filenames

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

About the filenames in bitmap2LCD

Basically the filenames in bitmap2LCD are all associated to the Artwork “bitmap” filename.

In the “File” main menu, you can see the active project, the bitmap and the data output filenames (green arrow)

OUTPUT : The data output file extension can be selected in the configuration settings panel (Main settings + data syntax tab)

IMAGE : is always a bitmap (.BMP) – or a gif if it’s a GLCD animation project (.GIF) –

Bitmap2lcd About filenames

A touch panel part of an artwork will also have a similar filename.

To save an artwork under a new or different filename, click in the main menu  (red arrow) and define the new “artwork” filename ( a bmp ! ) . (This function is also accessible from the work canvas side buttons )

Newbitmap” is the default artwork name : NewBitmap.bmp and NewBitmap.h

 

Bitmap2LCD : Hide and Show the Desktop Icons

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

Hide and Show the Desktop Icons

When using the programming tool with the floating windows style ( instead of the MDi Style – with the Main Form beeing a Background and an optional Wallpaper -) , in other words when the desktop wallpaper becomes the program wallpaper, you can choose to hide / show the destop icons using a button located in the main buttons bar (red arrow)

Bitmap2lcd Show Hide Desktop Icons

In the Configuration settings, a checkbox can be checked to automatically hide the desktop icons at start and show them again when the program is closed (see red arrows below)

Bitmap2lcd Desktop Icons Config 2

Bitmap2LCD : Sizeable Editor separated from the File Explorer

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

Sizeable Text Editor and Separate File Explorer

From Version V2.8b, you can split the “File Explorer” and the “Graphics Preview & Editors” (red arrow) into two separate Windows (See button pointed by blue arrows)

Bitmap2lcd Split Editor and Explorer 2

The “Graphics Preview and Editors” Window can then be resized.

Use the same buttons to reunite the windows.

Bitmap2lcd Split Editor and Explorer 1

Bitmap2LCD : Example of moving a group of pixels

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

Example of moving of a group of pixels

1 . Click Select Contiguous Pixels Button  (red arrow)

2 . Click inside the area of pixels (a group of pixels separated from the others, an island (blue arrow)

–> The seleted group of pixels becomes red

3. Click the Selection Area button (green arrow)

Bitmap2LCD moving Pixels 1

4. Move the mouse cursor inside the selected area (blue arrow) and drag the area to the destination (orange arrow below)

5. Click Paste button

Bitmap2LCD moving Pixels 2

6. To “delete” the moved area, press the escape key ( to clear the addition of pixels to the last selection)  and press the delete key (in this case the background color should be white )

Bitmap2LCD : Replace a color with another in the entire Work Canvas

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

Replacing a color with another in the entire Work Canvas

1. Pick Source Color with color picker A inside the work canvas

2. Pick Target Color with Color picker B inside the work Canvas

3. Replace every color A pixel with color B in the Work Canvas (green arrow)

Bitmap2LCD Replacing Colors

 

Bitmap2lcd : Output of an Array of [ Arrays of Pixel lines ]

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

Output of an Array of [ Arrays of  Pixel lines ]

Data of one display line of pixels (direction can be either in colums or in rows) can be separate in a sub array (green arrow)

Example of this kind of data output   (Checkbox enabled must be set )

[[    — Array prefix example

[data for line 1]

[data for line 2]

[data for line n]

]]  — Array suffix example

 

Bitmap2LCD Configuration Settings Python