X
-
I figured out the color issue. There was a commandline option that I didn't notice the first time for swapping the red and green color fields. Once I did that, the colors are perfect. Thanks for all the help Majenko.
-
I looked at the resources you suggested and I was able to write the bitmap on the screen. There is one further problem, however. The bitmap is mostly black and white, but there is some yellow elements in it. When it shows up on the Picadillo, the yellow is blue instead.
This file is from a vector graphics file that was converted to SVG and opened in Inkscape. It looks fine in Inkscape. It was then exported to a PNG of correct dimensions, which was then converted to a BMP file. This final BMP file also looks correct. I then used a windows commandline program that I found on the internet called "lpcbmp2c.exe" to convert it to a C file that can be compiled into the program. Is there a better method than this lpcbmp2c app to generate the C code? Is that likely the cause of the color issue?
Thanks again for all of your help.
Leave a comment:
-
You should take a look at some of the examples that come with the Picadillo library. There are three there that do what you want - the 7Segment, DoubleBuffer and Filters demos.
7Segment has the graphics for a 7-segment display embedded in the code. The DoubleBuffer draws a wall pattern bitmap into a framebuffer to manipulate and display, and the Filters demo loads a picture and applies various effects to it.
All three use the Raw565 library to access the image dara in memory:
Code:#include <Raw565.h> Raw565 img1(ieLogo_data, 320, 160); // ... img1.draw(&tft, 0, 0);
Leave a comment:
-
Ah, sorry, I was trying to keep from posting too much irrelevant code. That code isn't my actual code, it was a snippet of code I found on this forum that was using the TFT library. I am instead using:
#include <Picadillo.h>
Sorry for the confusion.
Leave a comment:
-
Hello,
It looks like you are still using the TFT library. This has been superseded for a little while now, and the DisplayCore library is now the current one in use.
There are a few posts on the forum about it. This may be related.
If you remove the TFT library, then the DisplayCore library is built into the Alpha release, and you can download other supporting libraries/plugins from the Plugin Manager.
See if that helps, and if not reply back, and ill get someone with more experience with the Picadillo to reply to you
Regards
Leave a comment:
-
Displaying a BMP on the screen without using SD card
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"
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.
Tags: None
Leave a comment: