UnityGifDecoder icon indicating copy to clipboard operation
UnityGifDecoder copied to clipboard

Code size problem

Open cryax opened this issue 9 years ago • 2 comments

Hi, I got this issue:"Code size larger than max(12)". Why do we need a max value (12) here? Can i increase this value or just remove it from your code?

cryax avatar Aug 11 '16 03:08 cryax

The code size is an exponent, so a max size of 12 is actually 2^12 (or 1 << 12), which is 4096. I think that is a limit of the GIF format's use of the LZW compression, but it's been a while since I've touched this stuff. I think removing/changing that max value might get you past that particular check, but would just corrupt the data afterwards...

Here is one of the main documents I was following for my implementation: http://www.matthewflickinger.com/lab/whatsinagif/lzw_image_data.asp

I'll look into it later so I can give a better response, but I wanted to post some info for now.

klutch avatar Aug 11 '16 12:08 klutch

Get it. Thanks for quick response

cryax avatar Aug 11 '16 15:08 cryax