shraiwi / ESPGIF

An ESP8266 GIF player!
Apache License 2.0
16 stars 2 forks source link

240p GIFs #1

Open Adrianormrs opened 3 years ago

Adrianormrs commented 3 years ago

Hi, Thanks for sharing your project, is pretty cool and works smoothly. However, I've been trying to implement on an ESP8266 and a ST7789 TFT, which has 240x240 resolution, I used antoher library to interface the ESP with TFT, worked well, but it only shows the gif in the first quarter of the screen due the GIF's resolution, I tried to stretch the GIF to 240p size changing the parameters SCREEN_WIDTH and SCREEN_HEIGHT but the code stopped working. Do you have some idea whats I have to do? Thanks

shraiwi commented 3 years ago

Do you have a photo of what the glitch looks like? Can you describe it further? I have a feeling that the reason it broke was because there was an issue with the resolutions. You need to make sure that the GIF from GIFConvert.py has the same resolution as the output GIF resolution. Change line 26 in GIFConvert.py to reflect the resolution of your display. However, without more clarification I can't help you diagnose this problem any further. I'm here to help!

Adrianormrs commented 3 years ago

When I use your sketch, only changing the TFT library, this is the result.. https://drive.google.com/file/d/1cIhQ9JBsCCNyZjT0ZStTLN_Q-gG0Ve7U/view?usp=sharing It works fine! If I only change the size of the screen at the top of the sketch, trying to stretch the gif, the code won't upload, I think It's because the number of pixels exceeds 16 bit of the variable, but I can't create a 32 bit variable either. 01

This is the error I got: c:/users/mega pixel/documents/arduinodata/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: address 0x4000acf8 of C:\Users\MEGAPI~2\AppData\Local\Temp\arduino_build_460937/ST7789_GIF_V2.ino.ino.elf section .bss' is not within regiondram0_0_seg'

c:/users/mega pixel/documents/arduinodata/packages/esp8266/tools/xtensa-lx106-elf-gcc/2.5.0-4-b40a506/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: address 0x4000acf8 of C:\Users\MEGAPI~2\AppData\Local\Temp\arduino_build_460937/ST7789_GIF_V2.ino.ino.elf section .bss' is not within regiondram0_0_seg'

collect2.exe: error: ld returned 1 exit status

Additionaly, I did the changes in the GIFConverter.py as you said, and used a 240p GIF, but I only changed the GIF.h, the sketch remains with 128x128 resolution, this is the result..

https://drive.google.com/file/d/1q5zUnGC0BQv6xeNHf5c_15OZ_h3wKFC9/view?usp=sharing

Thanks a lot for your help!

shraiwi commented 3 years ago

Looking at the error, it seems that the GIF is too big and it cannot fit in program memory. As of right now, the Arduino simply blits a raw frame directly from flash to the screen, which is fast, but it's storage-hungry. Maybe you can try it again with a smaller GIF?

Ate329 commented 10 months ago

I had the same issue, what I did is just to resize the gif and then it's working