Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frame cache to higher gif speed? #466

Open
DevOfLife opened this issue Oct 27, 2017 · 3 comments
Open

Frame cache to higher gif speed? #466

DevOfLife opened this issue Oct 27, 2017 · 3 comments

Comments

@DevOfLife
Copy link

I wonder that can we set speed higher (ex: 3x), it faster than decode time
i saw an android app did it (GifPlayer+: https://play.google.com/store/apps/details?id=jp.m_c8bit.gifplayer)
idk how did they do, i compared by using same gif and GifPlayer+ can do higher speed than this lib can decode

@koral--
Copy link
Owner

koral-- commented Oct 28, 2017

There is no ready-to-use frame caching in this library. However you can use low-level APIs like GifDecoder to retrieve more bitmaps and create your own animated drawable.

The fastest solution probably is to use OpenGLES textures and display them e.g. in GLSurfaceView. GifTexImage2D can be used to create such textures.

@koral-- koral-- closed this as completed Oct 28, 2017
@frmz
Copy link
Contributor

frmz commented Jan 29, 2020

@koral-- GifTexImage2D doesn't do any caching right now, can we reopen this? I would be awesome to have caching in GifTexImage2D instead of decoding frames at every loop. I think it could be easily done by using either a framebuffer or a memory buffer keeping the decoded frames. Either way it would speed up things massively and allow usage on live wallpapers which is basically not possible right now due to the insane CPU usage.

@koral--
Copy link
Owner

koral-- commented Jan 30, 2020

OK, turned into feature-request.
Feel free to submit a PR.

@koral-- koral-- reopened this Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants