-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error : Invalid code/color length, must be power of 2 and 2 #16
Comments
Provide the faulty gif file maybe ? |
You know, it's always more helpful to create better bug reports, with sample code, etc, otherwise we have to guess what you are doing. But anyway, seems like you must be trying to create a gif, as that exception comes from check_palette_and_num_colors() in GifWriter. The exception is self explanatory, the palette you supply must be a power of two between 2 and 256 (inclusive). That is simply how the GIF format works, search for "Size of Global Color Table" in: https://www.w3.org/Graphics/GIF/spec-gif89a.txt So, make sure your palette conforms to those restrictions, the file format doesn't allow you to do anything else. Attached is a screenshot of Photoshop's GIF dialog. You can see the same restriction on palette sizes there. Of course, you don't need to use every color in the palette, so if you have 61 colors you can create a palette of 64 and put whatever you want in the extra 3 entries. |
Thanks for the instance response. We are uding three js 3D container and FYI : When I load a model without texture thats black color its creating On 2016-10-03 10:57, Dean McNamee wrote:
|
Throwing this error and returning empty gif file. Please help me to resolve this.
The text was updated successfully, but these errors were encountered: