Hey, I've been trying to use the bmpToRaster tool included with StarterWare to convert an image and display it on an LCD, but it doesn't seem to be working properly.
I built the tool on a system running Ubuntu, and I tried converting the image below using it, but I'm not really getting any meaningful output
The exact command I'm running is ./a.out 640 480 screentest.bmp image.h 24 RGB, and this is the file that it spits out:
When I tried to load this file with my project, less than a tenth of the screen I'm using (vertically) gets filled with garbage and the rest is blank.
My next thought was to compare my new image.h file with the image.h file included with the StarterWare project. The StarterWare file is around 40,000 lines, most of which contain nothing but 0x00ffffff entries in an array, which I assume represents white. When I look at the file I get from the bmpToRaster tool, the file is only around 2,800 lines (with the same formatting) and the array values are more or less random, which doesn't match up with the image I'm converting. As an aside, the ratio of lines of code between the StarterWare image.h and my own image.h matches almost exactly which the ratio between garbage on the LCD screen and the total area on the screen.
My only guess at this point is that there is some issue with the bitmap I'm passing in for my argument, or with how the bmpToRaster program is dealing with it. I started looking at the source code and it was a bit over my head, but it looks as though there is functionality to handle different bitmap types (bit depths). The image I'm using is a 24-bit bitmap, so I was thinking that the program might be handling it differently and causing it to be squished. I really don't know much about bitmaps in general so this is more of a guess than anything. The program does understand the size of my bitmap, since I can only pass in "640 480" as parameters without getting an error.