summaryrefslogtreecommitdiff
path: root/tests/test-images/gif-test-suite
Commit message (Collapse)AuthorAgeFilesLines
* Add tests for GIF files with invalid LZW code sizesRobert Ancell2022-02-027-0/+35
|
* Fix test GIF that was broken in the LZW code size, not the values of the pixelsRobert Ancell2022-02-021-0/+0
|
* gif: Fix multiple LZW clear codes breaking decodingRobert Ancell2019-01-161-2/+2
| | | | | | | | | | | | | | | | 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).
* gif: Fix off by one error in LZW decoderRobert Ancell2019-01-161-2/+2
| | | | | | | | | | | | | | | | | 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.
* tests: Add comprehensive GIF test suiteRobert Ancell2019-01-16224-0/+1335
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)