Skip to content

Conversation

@JimBobSquarePants
Copy link
Member

@JimBobSquarePants JimBobSquarePants commented Aug 3, 2021

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository. These follow strict Stylecop rules 👮.
  • I have provided test coverage for my change (where applicable)

Description

While investigating #1583 I realized that the static default options in all the quantizer instances could be overwritten which we should not allow.

I've also ensured we throw a better exception should someone use the default current struct instances to dither.

@codecov
Copy link

codecov bot commented Aug 3, 2021

Codecov Report

Merging #1721 (3e56885) into master (c084b5f) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1721   +/-   ##
=======================================
  Coverage   84.40%   84.41%           
=======================================
  Files         822      822           
  Lines       36056    36063    +7     
  Branches     4203     4207    +4     
=======================================
+ Hits        30434    30443    +9     
  Misses       4802     4802           
+ Partials      820      818    -2     
Flag Coverage Δ
unittests 84.41% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...arp/Processing/Processors/Dithering/ErrorDither.cs 100.00% <100.00%> (+1.96%) ⬆️
...p/Processing/Processors/Dithering/OrderedDither.cs 100.00% <100.00%> (+2.00%) ⬆️
...cessing/Processors/Quantization/OctreeQuantizer.cs 100.00% <100.00%> (ø)
...essing/Processors/Quantization/PaletteQuantizer.cs 100.00% <100.00%> (ø)
...Processors/Quantization/WebSafePaletteQuantizer.cs 100.00% <100.00%> (ø)
.../Processors/Quantization/WernerPaletteQuantizer.cs 100.00% <100.00%> (ø)
.../Processing/Processors/Quantization/WuQuantizer.cs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c084b5f...3e56885. Read the comment docs.

Copy link
Member

@antonfirsov antonfirsov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@antonfirsov
Copy link
Member

Wait ... should we do the same checks in ApplyPaletteDither ?

@JimBobSquarePants
Copy link
Member Author

Wait ... should we do the same checks in ApplyPaletteDither ?

Yuuuuuuuup. Missed that, good catch! Done.

@JimBobSquarePants JimBobSquarePants merged commit 4638965 into master Aug 4, 2021
@JimBobSquarePants JimBobSquarePants deleted the js/fix-divide-by-zero branch August 4, 2021 02:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants