Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@skidder
Copy link
Contributor

@skidder skidder commented Nov 10, 2024

This PR enhances the GIF decoder to properly handle animated GIF to WebP conversion, focusing on frame disposal methods and animation metadata.

Key Improvements

  1. Proper Frame Disposal

    • Maps GIF disposal methods to WebP equivalents
    • Fixes visual artifacts in animations with transparent regions
    • Properly handles frame-to-frame transitions
  2. Animation Metadata

    • Combined loop count and frame count reading into single pass
    • Cached animation info to prevent redundant processing
    • More accurate frame counting
  3. Performance

    • Single-pass metadata reading
    • Cached animation information
    • Reduced file parsing overhead

These changes ensure that animated GIFs are correctly converted to WebP format while maintaining visual fidelity and animation timing.

@skidder skidder changed the title fix: Report the frame-count and dispose method for animated gif inputs. fix: Report frame-count, dispose-method, and background-color from GIF for use with animated WebP Nov 12, 2024
@skidder skidder merged commit acdc956 into master Nov 12, 2024
2 checks passed
@skidder skidder deleted the skidder/fix-animated-gif-transformations-to-animated-webp branch November 12, 2024 16:44
skidder added a commit that referenced this pull request Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants