pixelmatix / gifdecoder Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
More details here: pixelmatix/AnimatedGIFs#26
I think this shows how to allocate the block needed for AnimatedGIF with malloc (after allocating mymemorypool with malloc):
I'm trying to compile the code for AnimatedGifs from SmartMatrix and I have downloaded all the libraries I need, when I went to compile it gave me this error message
C:\Users\Ricky\Desktop\Arduino\libraries\GifDecodermaster\src/GifDecoder_Impl.h: In member function 'int GifDecoder<maxGifWidth, maxGifHeight, lzwMaxBits, useMalloc>::startDecoding(uint8_t*, int)':
C:\Users\Ricky\Desktop\Arduino\libraries\GifDecodermaster\src/GifDecoder_Impl.h:323:16: error: 'BIG_ENDIAN_PIXELS' was not declared in this scope
gif->begin(BIG_ENDIAN_PIXELS, GIF_PALETTE_RGB888);
^
Error compiling for board Teensy 3.5.
The error comes from the file GifDecoder_Impl.h and I don't know how to fix it
A few weeks after I did the first release of GifDecoder, the AnimatedGIF Library was released and it looks to be a much more efficient GIF decoder, and with an active developer making improvements and fixing bugs. I was planning to switch my code using the old AnimatedGIFs sketch or GifDecoder library over to AnimatedGIF, but I think there's still room for a GIF library with a more beginner friendly API. AnimatedGIF requires the sketch to include some callback functions that are a little complex, e.g. the GIF disposal methods are implemented in the user's sketch, not in the library.
I updated GifDecoder to act as a wrapper for AnimatedGIF, keeping the API nearly the same and adding any complex code like handling the GIF disposal methods inside the GifDecoder class. I didn't implement support for 16-bit color palettes or the DrawPixelRow() callback that's needed for the Arcada GifDecoder as some thought needs to go into how to tell GifDecoder to choose between 24-bit and 16-bit palettes (previously it was hardcoded with a #define).
I have a branch with these changes, and the SmartMatrixGifPlayer example is running:
AnimatedGIF library can support 16-bit palettes, which is more efficient than converting 24-bit colors to 16-bit each time the pixel is drawn. Some thought needs to go into how to support this
I'm trying to load a GIF file from an SD card on a Teensy 4.1 and display it on a SMARTMATRIX_HUB75_16ROW_MOD8SCAN 448x16 matrix.
I'm using an AnimatedGifsTest example. I tried two configurations:
kRefreshDepth = 36;
kDmaBufferRows = 4;
matrix.setRefreshRate(90);
and
kRefreshDepth = 12;
kDmaBufferRows = 2;
matrix.setRefreshRate(30);
Both produced the same results. Here's the serial output:
Starting AnimatedGIFs Sketch
1:1.gif size:2105
2:1.2.gif size:2137
3:1.1.gif size:2126
4:2.gif size:2139
Pathname: /gifs/1.gif
Successfully opened GIF; Canvas size = 319 x 16
Pathname: /gifs/1.2.gif
open failed: 2
Pathname: /gifs/1.2.gif
open failed: 2
1.gif
has a size of 319x16
1.2.gif
has a size of 320x16
Is there anything i could do to load a larger GIF?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.