GLCD KS0108 bitmap


I have define my GLCD into 3 display areas and I would like to display bitmap in one of this area However, the command GLCD.Drawbitmap which cannot be use to display bitmap in only the defined area.

I have converted several bitmap file of different sizes to the h file required for Arduino.

The smallest size 16 x 16 is still very big when display on the GLCD. How can I reduce the size?

A bitmap of size 16 x 16 and of size 48 x 48 when display on the GLCD looks exactly the same size.

How can I reduce the size?

The areas that can be defined are text areas.
The graphic functions operate on the full display region.

The DrawBitmap() function draws a bitmap on the glcd from data that indicates the size.
(The data in the bitmap header indicates what size the image is)
DrawBitmap() doesn't have ability to re-scale the bitmap
so you must shrink the image before the header file is created.

What tools are you using the create the bitmap header files?
Are you using the included java bitmap tool that comes with the library?

It depends on the tools used but often the bitmap image is resized
before it is converted to a glcd library bitmap header.

So if the bitmap image is in a jpg or bmp image format, the image
is resized to create a new image file. Then the new image file,
which has the resized image, is used to create a glcd library bitmap header.

--- bill

I see that the bitmap cannot be drawn in a defined area.

Now I would like to try if i can reduce the size of the bitmap and position it in the area that I want to.

I am using the java bitmap tool provided to create the header file.

I choose bitmap of various size and use the tool to create the header file however regardless of the original bitmap size, it turns out the same when display on the GLCD.

The two bitmap files that I attached are of size 16 x 16 and 48 x 48 but when I convert them to header file and display it on GLCD, both has the same size.

shower32.bmp (6.8 KB)


Can you show the two header files that were created?

I have attached the header files

shower.h (1.91 KB)

shower32.h (1.92 KB)

I don’t see that when I use the tool.
I’m using it on XP.
Attached is a zip with the two files I get

— bill (1.12 KB)

Thanks, I have managed to re-size the picture using Paint.