1. 27 Feb, 2019 7 commits
  2. 24 Feb, 2019 1 commit
  3. 21 Feb, 2019 1 commit
  4. 18 Feb, 2019 1 commit
  5. 17 Feb, 2019 1 commit
  6. 01 Feb, 2019 1 commit
  7. 28 Jan, 2019 1 commit
  8. 16 Jan, 2019 6 commits
    • Robert Ancell's avatar
      gif: Simplify LZW clear code handling · a314f593
      Robert Ancell authored
      The existing code had a special state for handling codes after a clear code was
      received. This is more simply handled by using the 'lzw_oldcode' variable. This
      makes code that is less likely to introduce errors.
      a314f593
    • Robert Ancell's avatar
      gif: Add "Circular table entry" failing GIF image test case · 0b9d0041
      Robert Ancell authored
      An example image that generates the "Circular table entry in GIF file" error.
      0b9d0041
    • Robert Ancell's avatar
      gif: Fix clear code handling when at end of a block · 88ceed9e
      Robert Ancell authored
      The following was occurring:
      1. A clear code is detected in the LZW stream.
      2. The decoder enters a clear code handling state.
      3. The decoder looks for the next code after the clear.
      4. The decoder has run out of blocks, so enters a state to get new blocks
      
      The issue is in step 4 the decoder has assumed the clear state is complete,
      when it is not. The solution is to only complete the clear state once a
      non clear code is read.
      
      This caused the "Circular table entry in GIF file" error for some GIFs.
      Fixes GNOME/gdk-pixbuf#27
      Fixes GNOME/gdk-pixbuf#69
      88ceed9e
    • Robert Ancell's avatar
      gif: Fix multiple LZW clear codes breaking decoding · b9b12bfd
      Robert Ancell authored
      The following was occurring:
      1. A clear code is detected in the LZW stream
      2. The first code is detected as a clear.
      3. The following code is returned as a color index, this breaks if it is a
         clear.
      
      There were two codepaths in use, one for handling the first clear in the LZW
      sequence and another for handling clears within the sequence. The former
      handled sequential clears correctly, the latter did not.
      
      The solution is to the correct codepath and remove the other one. This
      simplification should not affect other decoding (as confirmed by the test
      suite).
      b9b12bfd
    • Robert Ancell's avatar
      gif: Fix off by one error in LZW decoder · 06afde5c
      Robert Ancell authored
      The following was occurring:
      1. Code words would be read from the LZW data blocks.
      2. If there was exactly enough space for one more codeword in the block, more
         blocks were read. This is the off by one error. It should have read the
         last code before doing this.
      3. If the next block was the terminating block the code would be marked as
         complete.
      4. Another block would be attempted to be read, because the decoder was still
         in the same state as step 2.
      5. An error was generated because the decoder was trying to read blocks after it
         had determined the stream had ended.
      
      This fixes the GIF decoder failing to decode images without an
      end-of-information code.
      06afde5c
    • Robert Ancell's avatar
      tests: Add comprehensive GIF test suite · fb32a04b
      Robert Ancell authored
      Add tests that exert many different types of GIF files. Some of the tests are
      disabled as the current gdk-pixbuf GIF implementation doesn't handle them
      correctly. Future commits will fix these issues and enable the tests.
      
      The test suite is generated in the PyGIF project
      (https://github.com/robert-ancell/pygif)
      fb32a04b
  9. 24 Dec, 2018 1 commit
  10. 14 Dec, 2018 2 commits
  11. 11 Dec, 2018 6 commits
  12. 06 Dec, 2018 1 commit
  13. 04 Dec, 2018 3 commits
  14. 22 Nov, 2018 1 commit
  15. 16 Nov, 2018 2 commits
  16. 04 Nov, 2018 1 commit
  17. 03 Nov, 2018 1 commit
  18. 31 Oct, 2018 1 commit
  19. 27 Oct, 2018 1 commit
  20. 24 Oct, 2018 1 commit