I Like Pi Posted October 6, 2007 Share Posted October 6, 2007 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). Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted October 6, 2007 Share Posted October 6, 2007 This belongs in coding, not troubleshooting. Moved to General Coding Quote The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
I Like Pi Posted October 6, 2007 Author Share Posted October 6, 2007 Sorry, I thought that it might be a bug. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.