Browse Source

Cleanup

Former-commit-id: 49673492818d8855ffd3da553d6f2950f49b41ab
Former-commit-id: 4d3cab5c2e711dc5762b14cd3c06353c6db1eb3e
Former-commit-id: 720837a9bd59896031eccd8cef78504a621a6daa
af/merge-core
James Jackson-South 10 years ago
parent
commit
af07fc3958
  1. 15
      src/ImageProcessorCore/Quantizers/Octree/OctreeQuantizer.cs

15
src/ImageProcessorCore/Quantizers/Octree/OctreeQuantizer.cs

@ -149,11 +149,6 @@ namespace ImageProcessorCore.Quantizers
/// </summary>
private readonly int maxColorBits;
/// <summary>
/// Number of leaves in the tree
/// </summary>
private int leafCount;
/// <summary>
/// Store the last node quantized
/// </summary>
@ -173,7 +168,7 @@ namespace ImageProcessorCore.Quantizers
public Octree(int maxColorBits)
{
this.maxColorBits = maxColorBits;
this.leafCount = 0;
this.Leaves = 0;
this.reducibleNodes = new OctreeNode[9];
this.root = new OctreeNode(0, this.maxColorBits, this);
this.previousColor = 0;
@ -183,11 +178,7 @@ namespace ImageProcessorCore.Quantizers
/// <summary>
/// Gets or sets the number of leaves in the tree
/// </summary>
public int Leaves
{
get { return this.leafCount; }
set { this.leafCount = value; }
}
private int Leaves { get; set; }
/// <summary>
/// Gets the array of reducible nodes
@ -292,7 +283,7 @@ namespace ImageProcessorCore.Quantizers
this.reducibleNodes[index] = node.NextReducible;
// Decrement the leaf count after reducing the node
this.leafCount -= node.Reduce();
this.Leaves -= node.Reduce();
// And just in case I've reduced the last color to be added, and the next color to
// be added is the same, invalidate the previousNode...

Loading…
Cancel
Save