Display Bitmap Problem

I am trying to draw a bitmap for another project that I have in mind. I tried to put a test bitmap on a Nokia5110 (PCD8544) display using the Adafruit GFX library, but the bitmap turns out to be different than I drew it. I used paint.net to draw a bitmap and this website: Create bitmap from image for Nokia5110 type displays (PCD8554) to generate the array from bmp file.

original *.bmp drawing is attached below (had to convert to png to upload) and result which is printed on display is also attached below.

here is my code:

#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_PCD8544.h>

Adafruit_PCD8544 display = Adafruit_PCD8544(7, 6, 5, 4, 3);

const uint8_t displayTest_Width    = 24;
const uint8_t displayTest_Height   = 32;
const uint8_t PROGMEM displayTest_Bitmap[] = { 
  0x00, 0x00, 0xe0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0xe0, 0x00, 0x00, 
  0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0xff, 0x00, 0x00, 0x00, 0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x10, 0x10, 0x10, 0x1f, 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
};

void setup() {
  display.begin();
  display.setContrast(62);
  display.display();
  display.clearDisplay();

}

void loop() {
  display.clearDisplay();
  display.drawBitmap(10, 10, displayTest_Bitmap, displayTest_Width, displayTest_Height, BLACK);
  display.display();
}

displayTest.png

displayTest.png

The library comes with an example that displays a bitmap. Does that example display the bitmap correctly?

If not, then there is something wrong with your wiring. If so, then there is something wrong with your data.

Which problem are we trying to solve?

There are different bitmap formats. That link you posted seems to generate arrays for a specific library.

I've always used the Adafruit_GFX library with XBitMaps successfully.

Pieter

PaulS:
The library comes with an example that displays a bitmap. Does that example display the bitmap correctly?

If not, then there is something wrong with your wiring. If so, then there is something wrong with your data.

Which problem are we trying to solve?

I am using the drawBitmap(); that is written in the pcdTest code of the Adafruit GFX library. The library generates its bitmap correctly but mine doesn't, I have triple checked my wiring it looks right to me, then I think I have generated the bitmap improperly?

PieterP:
There are different bitmap formats. That link you posted seems to generate arrays for a specific library.

I've always used the Adafruit_GFX library with XBitMaps successfully.

Pieter

If that is the case how do I generate a bitmap for the right library?

Generate an xbm file using GIMP, for example, and use the function for drawing XBitMaps.

PieterP:
Generate an xbm file using GIMP, for example, and use the function for drawing XBitMaps.

I will try GIMP is it also possible with paint.net?