Comments (3)
Provide the faulty gif file maybe ?
from omggif.
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.
from omggif.
Thanks for the instance response. We are uding three js 3D container and
capturing the animation to gif not a palette. That color differ models
to models. In this scenario how can do I proceed.
FYI : When I load a model without texture thats black color its creating
the gif but when its a color its showing the error.
On 2016-10-03 10:57, Dean McNamee wrote:
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 [1]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.[2]
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.You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub [3], or mute the
thread [4].
Links:
[1] https://www.w3.org/Graphics/GIF/spec-gif89a.txt
[2]
https://cloud.githubusercontent.com/assets/56582/19041871/266befe6-898a-11e6-9500-ca04b828e089.png
[3] #16 (comment)
[4]
https://github.com/notifications/unsubscribe-auth/AMXVy7aiD-3VKdQbGOg8aAo5K4JovMxqks5qwRfwgaJpZM4KMRMV
from omggif.
Related Issues (20)
- Please add license file HOT 2
- Disposal method 2 not supported HOT 2
- Combine frames with transparency HOT 3
- Quantization and efficient frame encoding
- Are you accepting PRs? HOT 4
- Infinite loop on truncated GIF HOT 3
- Unhelpful exception on exceeding buffer bounds HOT 5
- Exceptions do not include a stack trace
- Enumerate public API? HOT 3
- Blending operations in GIFs HOT 2
- Upload to bower
- Loop count when exporting GIF HOT 9
- Get global palette from GIF HOT 6
- Invalid Block Size HOT 5
- Supporting corrupted GIFs to some degree HOT 2
- Attempt to use undefined value HOT 1
- MIT license? HOT 3
- Corrupted GIF at the output HOT 4
- frame ghosting and partial frames HOT 1
- gifReader.decodeAndBlitFrameRGBA(frameNumber, pixels) does not work for higher frame HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omggif.