-
-
Notifications
You must be signed in to change notification settings - Fork 887
Add support for encoding 1 bit per pixel bitmaps #1623
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1623 +/- ##
=======================================
Coverage 83.67% 83.67%
=======================================
Files 749 749
Lines 33082 33111 +29
Branches 3707 3714 +7
=======================================
+ Hits 27682 27707 +25
- Misses 4681 4682 +1
- Partials 719 722 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@brianpopow Yep there's issues with how the Octree Quantizer currently distributes and reduces colors. (In addition to rampant memory usage issues) It does look like we should be able to do a fairly quick port based on the code here to a version that should allow accurate reduction. It's something I keep meaning to take the time to attempt. |
@JimBobSquarePants: Should I switch the default quantizer then to the Wu-Quantizer? |
For bitmap so we can get this PR in then yeah. I'll likely move back after depending on the results of profiling both once things have been fixed. |
JimBobSquarePants
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work. I can't believe we have all the bit depth support now! 😄
I can confirm that my new Octree code correctly quantizes down to 1-bit depth. Paint.NET uses this in production today with the latest 4.2.16 release. |
|
@rickbrew Awesome, that's great to hear, thanks! |
Prerequisites
Description
Add support for encoding 1 bit per pixel bitmaps.
@JimBobSquarePants: The bitmap encoder uses Octree Quantizer as a default. This quantizer does seem to have problems with just 2 colors. Im not so familiar with the Octree Quantizer. Is not possible to quantize with just to colors or is it maybe an issue we should look into? All indices seem to be 0.
If i change it to Wu quantizer it works with two colors.