Jump to content

octree


midora

Recommended Posts

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?

midoras signature.gif

Link to comment
Share on other sites

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.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

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.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

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 😉

 

midoras signature.gif

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...