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

Fix decoding error with trailing comment extension blocks #12

Merged
merged 3 commits into from
Feb 18, 2024

Commits on Feb 18, 2024

  1. Fix decoding error with trailing comment extension blocks

    The GIF files that can be found on the Internet come in a wide variety
    of forms. Some strictly adhere to the original specification, others do
    not and differ in the actual sequence of blocks or their number.
    
    For this reason, my decoder has a kind of "virtual" FrameBlock, which
    can contain all possible blocks in different order that occur in a GIF
    animation.
    
    - Graphic Control Extension
    - Image Description
    - Local Color Table
    - Image Data Block
    - Plain Text Extension
    - Application Extension
    - Comment Extension
    
    The TableBasedImage block, which is a chain of ImageDescriptor, (Local
    Color Table) and ImageData, is used as a feature for terminating a
    FrameBlock.
    
    So far I have only seen GIF files that follow this scheme. However,
    there was one example where one (or more) comment extensions were added
    before the end. Here the decoding process failed.
    
    This fix also adds "global comments" that are not part of my FrameBlock
    and are appended to the GifDataStream afterwards.
    olivervogel committed Feb 18, 2024
    Configuration menu
    Copy the full SHA
    cac9182 View commit details
    Browse the repository at this point in the history
  2. Fix doc block

    olivervogel committed Feb 18, 2024
    Configuration menu
    Copy the full SHA
    62e31f6 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c481309 View commit details
    Browse the repository at this point in the history