Git Product home page Git Product logo

Comments (3)

tobozo avatar tobozo commented on July 22, 2024

Provide the faulty gif file maybe ?

from omggif.

deanm avatar deanm commented on July 22, 2024

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.

srijackec avatar srijackec commented on July 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.