Bodmer / JPEGDecoder

A JPEG decoder library
Other
220 stars 64 forks source link

I get the list of error showen under #2

Closed fredericplante closed 7 years ago

fredericplante commented 7 years ago

Arduino: 1.6.5 (Windows XP), Board: "Arduino Due (Programming Port)"

Build options changed, rebuilding all

WARNING: library TFT_HX8357 claims to run on [avr] architecture(s) and may be incompatible with your current board which runs on [sam] architecture(s).

TFT_SDcard_jpg_v1.ino: In function 'void loop()': TFT_SDcard_jpg_v1:114: error: 'drawSdJpeg' was not declared in this scope TFT_SDcard_jpg_v1:135: error: 'createArray' was not declared in this scope TFT_SDcard_jpg_v1.ino: In function 'void drawSdJpeg(char, int, int)': TFT_SDcard_jpg_v1:149: error: 'renderJPEG' was not declared in this scope TFT_SDcard_jpg_v1.ino: In function 'void renderJPEG(int, int)': TFT_SDcard_jpg_v1:194: error: 'showTime' was not declared in this scope TFT_SDcard_jpg_v1.ino: In function 'void createArray(const char)': TFT_SDcard_jpg_v1.ino:258:40: warning: converting to non-pointer type 'int' from NULL [-Wconversion-null] Multiple libraries were found for "SPI.h"

Used: C:\Documents and Settings\So sory\Application Data\Arduino15\packages\arduino\hardware\sam\1.6.9\libraries\SPI

Not used: C:\Documents and Settings\So sory\My Documents\Arduino\libraries\SmingCore

'drawSdJpeg' was not declared in this scope

This report would have more information with "Show verbose output during compilation" enabled in File > Preferences.

Any cue to give me?

Bodmer commented 7 years ago

IDE 1.6.5 has an issue with functions in the sketch that are not declared before setup(). Use the latest IDE (1.6.12) or move the drawSdJpeg function to before setup().

fredericplante commented 7 years ago

I have installed the 1.6.12 last night, so far I make the SerialCsvOut example work on an ATmega2506, by changing the nature of the variable found at line 37:

from:

uint8 *pImg;

to:

unsign int *pImg;

The IDE compile the code, but I have not tested on board yet. Some how, when I fix this line, it also work on the 1.6.5 version of the IDE, but the nature of the variable has to be

short unsign int *pImg;

So great I will keep using 1.6.5. As for the 2 TFT examples, bouette, I get error message all over, it totally crash for many reason. But, since your library give out RGB 24bits/pixel by pixel, I'm going to try to merge this and the UTFT library, since it covers most TFT and has a draw bitmap function so filling the memory of a line and make it draw, one line at the time.

*320 pixels 3bytes/pixel = 960 bytes**

I will check it out this weekend and I will give you news about it

Bodmer commented 7 years ago

Note that the original library has been modified to return a 16 bit colors in 565 format.

Also note that the library returns the image in MCUs, typically 16x16 blocks of pixels, not line by line.

fredericplante commented 7 years ago

Oh! This is important to note. Mk thank you for the extra details :) 16x16 block of 16bit give out 512bytes of data each chunk. I think the UTFT library handle the 16 bits color mode. All should be fine.

Bodmer commented 7 years ago

OK, also note that the 16 bit colour format needed by UTFT might be RGB or BGR (5 bits of red and blue swapped)

fredericplante commented 7 years ago

Yeap! All is fine, your library work fine, my arduino folder was a mess, all is good now. ;)