| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
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)
|