Animated gif encoder error

There is too much code to insert into the question, so I contacted a public gist.

https://gist.github.com/JimBobSquarePants/cac72c4e7d9f05f13ac9

I have an animated gif encoder as part of the image library that I support, and something is wrong with it.

If I try to upload any gif that was output by the class to twitter, I get an internal server error, although if I pass them through http://ezgif.com/ while resizing to the same size, first load them correctly.

If I upload an image to http://www.smiliegenerator.us/ for analysis, I get the following error

unknown block type 0 at *different position each time* 

which tells me that I have some buffer offset error, although I don't know where.

Can anyone here tell me what went wrong?

The full library is hosted on Github here https://github.com/JimBobSquarePants/ImageProcessor/tree/V2

+5
source share
1 answer

Fix delete

 // Complete Application Block this.WriteByte(0); 

on line 253

This added an extra byte before the terminator.

+6
source

Source: https://habr.com/ru/post/1204875/


All Articles