Skip to content

fix(upscale): read an animated AVIF as a sequence - #1280

Merged
KnifeLemon merged 1 commit into
mainfrom
fix/upscale-animated-avif
Nov 8, 2026
Merged

KnifeLemon merged 1 commit into
mainfrom
fix/upscale-animated-avif

Conversation

@KnifeLemon

@KnifeLemon KnifeLemon commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

What does this change?

Since #1230 an AVIF image sequence is read as avis (AvifSequence.SourceFormat), so its frames stay one animation. The upscaler from #1064 still read the file as avif. SelectFrames("avif", "avif") then returned every frame and KeepsAnimation was false, so each frame went through upscayl-bin and ImageEncoder.Write wrote them as separate _p1.avif, _p2.avif, … (AVIF → PNG did the same).

UpscalerEngine.ReadFormat now picks the read format the way MagickImageConverter does: apng for an animated PNG saved as .png, avis for an AVIF sequence, otherwise the format as given. Found while re-reviewing #1064; I left it out of that PR so the author's branch only got merge and drift fixes.

Type of change

  • Bug fix

How was it tested?

  • dotnet test tests/Filee.Engines.Tests --filter Upscaler: 33 passed, 1 skipped (the real upscayl-bin run, not on this PC). The new test checks that an animated AVIF is read as avis and a still one as avif (a .png that isn't animated stays png), and that read as avis both frames are kept as one animation.

🤖 Generated with Claude Code

Main reads an AVIF image sequence as "avis" so it keeps its frames
(#1230). The upscaler (#1064) still read it as "avif", so every frame went
through the GPU and came out as separate _p1, _p2 stills. It now picks the
read format the way MagickImageConverter does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the bug Something isn't working label Nov 8, 2026
@KnifeLemon
KnifeLemon merged commit 18ee540 into main Nov 8, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant