Bitmap2LCD Issues

I'm a newbie, I'll just throw that out there to start things off :slight_smile:

I got my 128x64 Graphical LCD hooked up, and have written a bit of code for it. Essentially I'm just doing a quick little school project which takes a lot of explaining so we'll leave it at that :smiley:

Anywho, I've got a box with text inside it, that was no problem. However, I want to display my school's logo on the screen above the text. After much searching I found a couple programs to help out with this: fastLCD, and Bitmap2LCD (which I ended up using).

I opened the image and made the uncompressed array, saved it as a *.h file, and put it in the Arduino directory. I write the code to display this image, and this is where I run into some issues. The sketch compiles and uploads just fine, but the Arduino doesn't display anything. As soon as I remove the code for this one image, the sketch works, and displays the text just fine.

Any suggestions to help me out? If you want the *.pde and *.h, or anything else, just lemme know!

Thanks,

  • Jesse

How big is the .h file (or the image it is created from)? It sounds like you have run out of memory. Which Arduino (chip) do you have?

It may be helpful is you post your code.

How big is the .h file (or the image it is created from)? It sounds like you have run out of memory. Which Arduino (chip) do you have?

You appear to have hit the nail on the head! The *.h file is just under 60kb (yikes!).

How would I go about shrinking this file? Just decrease the size of the image?

Thanks,

  • Jesse

Well I deleted all the comments (which there were a ridiculous number of), and got the *.h down to 20kb. Unfortunately, this is still too big, and I'm using more memory than I have. I guess I'll try to resize the image.

  • Jesse

Assuming it's a B&W LCD a full screen bitmap should only be 1KB (128*64/8) so something isn't going right...

Oh wait, are you looking at the file size or the size of the array? because comments etc. don't end up on the chip, pretty much just the data in the array

There's the properties of the header. I deleted every single comment, it's just the code. I don't know what's going on.

  • Jesse

yeah ok, thats the file size on your PC it has little to do with the array size :slight_smile:

in the header file you should see something like:

char bitmap[] = {0x00, 0xFF, 0x00, 0xFF, 0x00};

that array is 5 bytes

Are you using the KS0108 library?

yeah ok, thats the file size on your PC it has little to do with the array size Smiley

in the header file you should see something like:

I'm starting to think that this program didn't work as it's intended to; it doesn't resemble in any way the code you posted, or the code in the ArduinoIcon.h file. It looks something like this

#include <avr/pgmspace.h>

const prog_uint8_t  ClarenceFulton [] = {
0x00,
 0x00,
 0x01,
 0x80,
 0x00,
 0x00,
 0x00,
...
...
};

Each value has it's own line, and there's over 2000 of them. :o

Are you using the KS0108 library?

Yes I am.

If theres over 2000 of them then that array is over 2KB, still way too big.

That leave 2 options,

First the generated bitmap is RGB, in colour, making it 3 times the size of a B&W

Second, the bitmap is far to high resolution.

The remedy for the first is to check that in you bitmap generator it's set for B&W.

And the second will need you to resize the image in the bitmap generator if it has the option, or use something like Paint to do it beforehand :slight_smile:

Well I did some more fooling around trying to get it to work, and I got it down to 479, which I'd say is a great improvement from 2000+ ;D

It compiles, and the Arduino runs the code! Except, it doesn't display the image.

Oh well, starting to make some progress here. :slight_smile:

Thanks,

  • Jesse

yay for progress :smiley:

Not sure how much help it would be, but examples are handy to have.

See if this fills any gaps :slight_smile:

#include <ks0108.h>
#include "mini.h"     // bitmap 

void setup(){
  pinMode(3, OUTPUT);
  analogWrite(3, 255);
  GLCD.Init(NON_INVERTED);   // initialise the library, non inverted writes pixels onto a clear screen
  GLCD.ClearScreen();  
  GLCD.DrawBitmap(miniIcon, 0,0, BLACK); //draw the bitmap at the given x,y position
}


void  loop(){
  
}
#include <inttypes.h>
#include <avr/pgmspace.h>

#ifndef ArduinoIcon_H
#define ArduinoIcon_H

static uint8_t miniIcon[] PROGMEM = {
  128, // width
  64, // height

0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0x40, 0x40, 0x20, 0xC0, 0x20, 0x90, 0x60, 0x90, 0x70, 0x90, 0x50, 0xB0, 0x48, 0xF0, 0x88,
0x20, 0x48, 0xE8, 0xB8, 0x68, 0xD0, 0xBC, 0xD8, 0xB0, 0xEC, 0x38, 0xE8, 0x5C, 0xF8, 0xD0, 0x3C,
0xE8, 0x58, 0x7C, 0xD8, 0x30, 0xDC, 0xF8, 0x18, 0xF8, 0x98, 0x68, 0x38, 0x48, 0x38, 0x30, 0x28,
0x30, 0x30, 0x30, 0x20, 0x30, 0x60, 0x40, 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, 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, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, 0x1C, 0x03,
0x00, 0x00, 0x01, 0x00, 0x00, 0xFC, 0x03, 0x00, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x80, 0x00,
0x12, 0x6F, 0xA8, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x41, 0xD3, 0x7F, 0xD4, 0xBF, 0x83, 0x00,
0x80, 0x00, 0x80, 0x00, 0x80, 0x01, 0x01, 0x01, 0x43, 0xFE, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x0A, 0x08, 0x70, 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, 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, 0xC0, 0x20, 0x0C, 0xC3, 0x04, 0x12, 0xC4,
0x02, 0x8C, 0x02, 0x94, 0x25, 0x07, 0x2A, 0x86, 0x0B, 0x16, 0x3D, 0x85, 0x18, 0x0D, 0x79, 0x4F,
0x7E, 0x81, 0xA6, 0x0A, 0x84, 0x0E, 0x14, 0x26, 0x8C, 0x07, 0x29, 0x07, 0x26, 0x0D, 0x02, 0x47,
0x0D, 0x03, 0x15, 0x03, 0x0D, 0x42, 0x05, 0x06, 0x17, 0x82, 0x06, 0x0B, 0x26, 0x03, 0x06, 0x26,
0x02, 0x06, 0x44, 0x04, 0x0C, 0x00, 0x16, 0x44, 0x0E, 0x06, 0x8C, 0x16, 0x0D, 0x06, 0x94, 0x04,
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, 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, 0xF0, 0xFE, 0xB0, 0xAA, 0x48, 0xBA, 0x40, 0xFA,
0x00, 0xF5, 0x4B, 0xB0, 0x54, 0xF3, 0x0C, 0xF2, 0x2C, 0xD1, 0x2E, 0xF0, 0x8E, 0x70, 0xCC, 0x29,
0xD2, 0x2C, 0xD0, 0x29, 0xD2, 0x28, 0xD0, 0xAA, 0xA0, 0x28, 0xE0, 0x09, 0xE0, 0x12, 0xC0, 0xA8,
0x00, 0xC1, 0x14, 0xC0, 0x00, 0x10, 0x41, 0xC0, 0xA4, 0xC0, 0x30, 0xE2, 0x08, 0xE0, 0x90, 0x41,
0xA0, 0x84, 0x20, 0xC8, 0x21, 0x90, 0x44, 0x90, 0x60, 0x8C, 0x40, 0xB0, 0x4C, 0x80, 0x70, 0x04,
0xD0, 0x01,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0x88, 0xF9, 0xF8, 0xAD, 0x58, 0xFC, 0xAC, 0xFC,
0xB4, 0xDC, 0x7C, 0x46, 0x7C, 0x3E, 0x6A, 0x3E, 0x36, 0x2E, 0x3E, 0x01, 0x7F, 0x3F, 0x3F, 0x1F,
0x0F, 0x07, 0x01, 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, 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, 0x03, 0x07, 0x0F, 0x1F, 0x3E, 0x3D, 0x7F, 0x7F, 0x7C, 0x7F, 0x7F, 0x7F, 0x7F, 0x3F, 0x3F,
0x1F, 0x0F, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x01, 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, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
#endif

I now have a very nice looking Mini displayed on my screen :smiley:

I just used your header file and wrote my own sketch without looking at yours, just to make sure I was writing to code right. It appears I am. I'll just have to try to get my header file working now.

Thanks,

  • Jesse

Well I finally got the sketch to upload and run. It's just a bunch of random pixels. Sigh. I think I need to find me a new program.

  • Jesse

The Arduino playground writeup for the ks0108 library says:
Embeding images in your firmware
A Processing sketch is provided in the download that converts bmp images to files that can be used by the library to display the image on the LCD. See the documentation in the download for more information.

The file is called glcdBitmap and is in a directory named Processing. You run it using the Processing environment on your PC, see http://processing.org/

An updated version of this code will be made available in the next release of the library. If you want a sneak peak, here is the new version:

/**
 * glcdBitmap. 
 * 
 * Creates a bitmap definition file that can be included in an Arduino sketch
 * to display a bitmap image on a graphics LCD using the Arduino GLCD library.
 *
 * Created  6 Nov  2008  Copyright Michael Margolis 2008,2010
 * updated  14 Feb 2010  
 */

import java.awt.dnd.*;
import java.awt.datatransfer.*;

String sourceImage;
String destinationOffset = ""; 

PImage bitmap;
PFont aFont;

int imgWidth;
int imgHeight;  
int imgPages;

void setup() 
{
  size(256, 256);
  background(255); // background to white
  noStroke();  // outline to black

  aFont   = createFont("Arial.bold", 12);
  textFont(aFont) ; 
  clearWindow();
}

void draw()
{
}

void clearWindow()
{
  fill(255);
  rect(0,0, width, height);
  fill(0); // font in black
  text("Drop image file (gif, jpg, tga, png) here", 10 ,height - 40);
  bitmap = null;  
}

void convert(String sourceImage)
{
  clearWindow();
  bitmap = loadImage(sourceImage);   // load the image
  if( bitmap != null)
  {
    imgWidth = bitmap.width;
    imgHeight = bitmap.height;
    imgPages = (imgHeight + 7)/8; // round up so each page contains 8 pixels    
    image(bitmap,0,0);
    print("Width = "); 
    println(imgWidth);
    print("Height = "); 
    println(imgHeight);
    print("Pages = "); 
    println(imgPages);
    print("Image bytes = "); 
    println(imgWidth * imgPages);     
    print("Pixels ="); 
    println(imgWidth * imgHeight);

    bitmap.loadPixels();
    String baseName = getBaseName(sourceImage);
    writeFile(sourceImage, baseName);    
    println("created header file for " + sourceImage);  
    text("Created file: " + baseName + ".h", 20 ,height - 20);
  }
  else
  {
    println("Unable to load image");  
    text("Unable to load image", 20 ,height - 20);
  }
}

void writeFile(String inFileName, String baseName)
{
  print("basename = "); 
  println(baseName);  
  String outFileName = destinationOffset + baseName + ".h"; 
 // String outFileName = baseName + ".h"; 
  print("Output file name = "); 
  println(outFileName);
  
  PrintWriter output;
  output = createWriter(outFileName);

  output.println("/* " + outFileName + " bitmap file for GLCD library */");
  output.println("/* Bitmap created from " + inFileName + "        */");
  String[] monthName = {
    "","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"    };
  output.println("/* Date: " +  day() + " " + monthName[month()] +  " " +  year() + "                             */" ); 
  output.println();

  output.println("#include <inttypes.h>");
  output.println("#include <avr/pgmspace.h>");
  output.println();
  output.println("#ifndef " + baseName + "_H");
  output.println("#define " + baseName + "_H");

  output.println();
  output.print("static uint8_t ");
  output.print(baseName);
  output.println("[] PROGMEM = {");

  output.print("  ");
  output.print(imgWidth);   // note width and height are bytes so 256 will be 0
  output.println(", // width"); 
  output.print("  ");
  output.print(imgHeight);
  output.println(", // height"); 
  stroke(0);
  for(int page=0; page < imgPages; page++) {
    output.println("\n  /* page " + page + " (lines "  + page*8 + "-" + (page*8+7) + ") */");
    output.print("  "); 
    for(int x=0; x < imgWidth; x++){
      output.print( "0x" + Integer.toHexString(getValue(x,page))) ;   
      if( (x == (width-1)) && (page == (((height +7)/8)-1))  )
        println("\n"); // this is the last element so new line instead of comma
      else   
        output.print(",");   // comma on all but last entry
      if( x % 16 == 15)
        output.print("\n  "); 
    }
  }  
  output.print("\n};\n");
  output.println("#endif");

  output.flush(); // Write the remaining data
  output.close(); // Finish the file

}

// return the byte representing data a the given page and x offset
int getValue( int x, int page){  
  //print("page= ");println(page);
  int val = 0; 
  for( byte bit=0; bit < 8; bit++){
    int y = page * 8 + bit;
    int pos = y * imgWidth + x; 
    if(pos < imgWidth * imgHeight) // skip padding if at the end of real data
    {       
      int c = bitmap.pixels[pos];    // get the color
      int r = (c >> 16) & 0xFF;      // get the rgb values 
      int g = (c >>  8) & 0xFF;
      int b = c         & 0xFF;    
      if( r < 128 || g < 128 || b < 128) // test if all values are closer to dark than light
      {
        val |=  (1 << bit);   // set the bit if this pixel is more dark than light
        point(x, y);   // draw the point in the window
      }         
    }    
  }
  return val;  
}

String getBaseName(String fileName) 
{
  File tmpFile = new File(fileName);
  tmpFile.getName();
  int whereDot = tmpFile.getName().lastIndexOf('.');
  if (0 < whereDot && whereDot <= tmpFile.getName().length() - 2 )
  {
    return tmpFile.getName().substring(0, whereDot);
    //extension = filename.substring(whereDot+1);
  }    
  return "";
}

DropTarget dt = new DropTarget(this, new DropTargetListener() {
  public void dragEnter(DropTargetDragEvent event) {
    //System.out.println("dragEnter " + event);
    event.acceptDrag(DnDConstants.ACTION_COPY);
  }   
  public void dragExit(DropTargetEvent event) {
    //System.out.println("dragExit " + event);
  }   
  public void dragOver(DropTargetDragEvent event) {
    //System.out.println("dragOver " + event);
    event.acceptDrag(DnDConstants.ACTION_COPY);
  }   
  public void dropActionChanged(DropTargetDragEvent event) {
    //System.out.println("dropActionChanged " + event);
  }   
  public void drop(DropTargetDropEvent event) {
    //System.out.println("drop " + event);
    event.acceptDrop(DnDConstants.ACTION_COPY);
    Transferable transferable = event.getTransferable();
    DataFlavor flavors[] = transferable.getTransferDataFlavors();
    int successful = 0;
    for (int i = 0; i < flavors.length; i++) { 
      try {   
        Object stuff = transferable.getTransferData(flavors[i]);
        if (!(stuff instanceof java.util.List)) continue;
        java.util.List list = (java.util.List) stuff;
        for (int j = 0; j < list.size(); j++) {     
          Object item = list.get(j);
          if (item instanceof File) {  
            File file = (File) item;
            String filename = file.getPath();
            convert(filename);         
          }   
        }  
      }   
      catch (Exception e) {   
        e.printStackTrace();
      }    
    }  
  }
}
);

The new version handles BMP, GIF, JPG, PNG, and TGA files. It will convert color images to monochrome.

Remember, it's a Processing sketch, not an arduino sketch, so install Processing and then paste this code into the Processing IDE.

Run the utility and drop the image file to be converted into the window.
If the image can be converted, a header file is created.
If the image file name is image.bmp, the header is named image.h
Copy this file to the directory with the ks0108 code and add the following to the Arduino sketch:
#include "image.h"

have fun!

VICTORY! Thank you all so much! :smiley:

  • Jesse

What did do to create the header file?

I ended up downloading Processing, and using the glcdBitmap sketch, as you suggested. There are a few pixels missing, but it's easy enough to open up the image in paint and fix that :slight_smile:

Thanks,

  • Jesse

was your source image a color bitmap?

I would be interested to see the image file, perhaps you can post it on flickr or similar and paste a link here.

was your source image a color bitmap?

I would be interested to see the image file, perhaps you can post it on flickr or similar and paste a link here.

It was a grayscale image; I photoshopped the original off my school's website so that it would be a grayscale bitmap, as that's what the previous program required.

I cleaned it up a bunch so that it's just the black lines, and none of the varying shades of gray that were surrounding them.

I'm considering re-doing it though, as I'm not 100% satisfied with this result. I'm also curious to see how it'd treat the original color image as well, so I may do some experimenting :slight_smile:

Thanks,

  • Jesse