Jump to content

Possible problem with OctreeQuantizer?


Recommended Posts

The OctreeQuantizer constructor checks if maxColors > 255 and maxColors < 2. Shouldn't the first be maxColors > 256?

In GetPalette, you invoke _octree.Palletize(_maxColors - 1); I think the unmodified _maxColors should be passed instead.

In a test case I made with a gradient, the GIF only saved with 254 colors and the PNG had 256 (reported by pngout).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...