midora Posted September 6, 2021 Share Posted September 6, 2021 Maybe I missed the info. Is it possible to access octree quantization from a filetype plugin in 4.30? A snippet for the usage would be fine. And is it possible to include the alpha channel into the quantization process to get a colortable containing ARGB values? Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 6, 2021 Share Posted September 6, 2021 It's not available right now, and is implemented via the IBitmapSource API that I haven't yet made available for plugins. I can look at it for a post-4.3 release though. Incorporating alpha is actually a very substantial change, the math gets significantly more complicated. Alpha can't be treated like the other channels. I wouldn't be able to guarantee high-quality output unless I spent a lot of time with it, and I'm not currently seeing a need for it. 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...
Rick Brewster Posted September 6, 2021 Share Posted September 6, 2021 The old FileType.Quantize() method was rebuilt to use the new quantization implementation, so there's that at least. That was in 4.2.16, IIRC. It's not as complete since it doesn't offer all the same options. 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...
midora Posted September 6, 2021 Author Share Posted September 6, 2021 15 minutes ago, Rick Brewster said: The old FileType.Quantize() method was rebuilt to use the new quantization implementation, so there's that at least. That was in 4.2.16, IIRC. It's not as complete since it doesn't offer all the same options. That's fine. I must have used in the .a.gif plugin. I agree that quantization using alpha is special. In the moment I have no idea how to do it best. To get octree in the future is a prospect 😉 Quote Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 6, 2021 Share Posted September 6, 2021 You can also adapt the code that I put on GitHub, https://github.com/paintdotnet/PaintDotNet.Quantization 1 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...
midora Posted September 7, 2021 Author Share Posted September 7, 2021 14 hours ago, Rick Brewster said: You can also adapt the code that I put on GitHub, https://github.com/paintdotnet/PaintDotNet.Quantization You really invested a lot of time in doing and document this. Seems you like this kind of work 😉 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.