I need to be able to display a bitmap file on the screen without loading it from the SD card. So, I found a commandline application that allows me to export a bitmap to several different formats. I used the 565 format that is indicated in this thread. The output has the form:
file: "IELOGO.h"
I found some code on the forum that does this, but I am unable to get it to compile, much less see if it works. The code that I am trying to use from a thread on this forum is:
I have to comment out the "extern char ieLogo_data", otherwise I am getting a "duplicate declaration" error. When I do comment it out, I get the following error:
I have tried searching the plugin manager for BMP.h, but have not found it. I am currently using UECIDE version 0.8.8alpha22.
Any help would be very much appreciated.
file: "IELOGO.h"
Code:
/* * BMP image data converted from 24bpp * to RGB565 */ #define COLOR_BPP 16 #define COLOR_STORAGE_SIZE 2 #define BMPWIDTH 320; #define BMPHEIGHT 160; const unsigned short ieLogo_data[] = { 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, . . . 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff, 0xffff };
Code:
#include <DSPI.h> #include <TFT.h> #include "IELOGO.h" extern char ieLogo_data[] asm("_binary_objects_img1_bmp_start"); BMP img1(ieLogo_data); // Set up the screen to use PICadillo35t tft; void setup() { img1.draw(&tft, 10, 10); } void loop() { }
Code:
Compiling... • Compiling sketch... In file included from C:\Users\Admin\Documents\UECIDE\Sketch\interface\interface.ino:1:0: • Error at line 93 in file interface.h: ‣ 'BMP' does not name a type BMP ieLogo(ieLogo_data); ^
Any help would be very much appreciated.
Comment