There's far too much code to paste into a question here so I have linked to a public gist.
https://gist.github.com/JimBobSquarePants/cac72c4e7d9f05f13ac9
I have an animated gif encoder as part of an image library that I maintain and there is something wrong with it.
If I attempt to upload any gif that have been output by the class to twitter I get an internal server error, though if I pass them through http://ezgif.com/ resizing to the same dimensions first they upload properly.
If I upload the image to http://www.smiliegenerator.us/ to analyse I get the following error
unknown block type 0 at *different position each time*
which indicates to me that I have some sort of buffer offset error though I don't know where.
Would anyone here be able to tell me what has gone wrong?
The full library is hosted on Github here https://github.com/JimBobSquarePants/ImageProcessor/tree/V2
To fix remove
// Complete Application Block
this.WriteByte(0);
at line 253
This was adding an extra unnecessary byte before the terminator.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With