Code Monkey home page Code Monkey logo

gifdecoder's People

Contributors

embedded-creations avatar jasoncoon avatar marcmerlin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gifdecoder's Issues

Error When Using for SmartMatrix

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

Replacing GIF decoding with AnimatedGIF Library

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:

https://github.com/pixelmatix/GifDecoder/tree/AGifLibrary

Support 16-bit palettes

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

Can't open GIFs wider than 319x16

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.