question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with adding APNG support

See original GitHub issue

APNG Image is always recognized as PNG

I am trying to add a custom decoder for APNG but running into an interesting issue. Because the headers start with the same sequence in APNG as PNG, Fresco always recognizes this as a PNG. In DefaultImageDecoder.decode(), you can see Fresco first checks for a default image format match before checking the custom decoders for a match. Because of this, an apng will always get seen as a png, even if all the format checkers and drawable factories are setup properly. Can you think of a way around this issue? (simply getting Fresco to check custom image formats first)

  • Fresco version: 2.0.0
  • Platform version: All Android versions

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
jkcailteuxcommented, Apr 27, 2020

I was able to successfully add APNG from this, thanks guys! Might open source it or PR it someday.

0reactions
wqafzalcommented, Oct 6, 2021

Hi. @jkcailteux did you open sourced your code yet?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Imported APNG files do not animate? | Apple Developer Forums
I'm having trouble getting . apng files to work - they preview correctly in Firefox (meaning when drag'n'dropped into a Firefox window, they...
Read more >
Add APNG support for Mozilla
This patch adds APNG support for to the PNG decoder, makes the default imgContainer implementation support basic animations and turns on unknown chunk ......
Read more >
Let's consider APNG support once again. - Google Groups
Absolutely, but we've already made a decision to include WebP, and that decision isn't what's at issue here. We're talking about adding APNG...
Read more >
APNG support should be added to Android (Animated PNG ...
Hello Android developers reading :) I would like to request native Android OS support for APNG files. For information on this open format...
Read more >
Animated PNG support - WordPress.org
For now there is no support for animated PNG files, this might change in the future but I can not say for sure....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found