Imagesharp: Animated Gif encoding broken

Created on 20 Dec 2016  路  3Comments  路  Source: SixLabors/ImageSharp

I updated from 1.0.0-alpha-000075 to 1.0.0-alpha-000195, and noticed that animated gifs seem to now have issues. I have done tests with a couple of images and see similar problems with both: black square artifacts on some frames of the gif.

I have been reproducing the issue by simply resizing the image

new Image(inStream)
    .Resize(300,0)
    .Save(outStream);

My original test image:
test-original

Resized using 1.0.0-alpha-000195
test-195

Resized using 1.0.0-alpha-000075
test-75

formats bug

Most helpful comment

Fixed now. Getting an odd result on a couple of frames when using the Octree Quantizer but the others work. Enjoy!

All 3 comments

Hi @jarroda

I had a look and it's some optimizations to the gif decoder that appear to have broken the decoder. I have created a branch to work on the problem and have managed to revert the code to get a working code sample. I need to reapply the optimizations though one at a time in order to get a final working version so it may take a day or two.

Cheers

James

Fantastic. Thanks.

Fixed now. Getting an odd result on a couple of frames when using the Octree Quantizer but the others work. Enjoy!

Was this page helpful?
0 / 5 - 0 ratings