diff --git a/lib/src/filter/quantize.dart b/lib/src/filter/quantize.dart index f7b4419b..a4cba958 100644 --- a/lib/src/filter/quantize.dart +++ b/lib/src/filter/quantize.dart @@ -17,7 +17,7 @@ Image quantize(Image src, if (method == QuantizeMethod.octree || numberOfColors < 4) { quantizer = OctreeQuantizer(src, numberOfColors: numberOfColors); - } else if (method == QuantizeMethod.octree) { + } else if (method == QuantizeMethod.neuralNet) { quantizer = NeuralQuantizer(src, numberOfColors: numberOfColors); } else { quantizer = BinaryQuantizer(); diff --git a/lib/src/formats/gif_encoder.dart b/lib/src/formats/gif_encoder.dart index 27006ed5..5d87684d 100644 --- a/lib/src/formats/gif_encoder.dart +++ b/lib/src/formats/gif_encoder.dart @@ -42,7 +42,7 @@ class GifEncoder extends Encoder { numberOfColors: numColors, samplingFactor: samplingFactor); } else if (quantizerType == QuantizerType.octree) { _lastColorMap = OctreeQuantizer(image, numberOfColors: numColors); - } else if (quantizerType == QuantizerType.binary) { + } else { _lastColorMap = BinaryQuantizer(); } @@ -76,7 +76,7 @@ class GifEncoder extends Encoder { numberOfColors: numColors, samplingFactor: samplingFactor); } else if (quantizerType == QuantizerType.octree) { _lastColorMap = OctreeQuantizer(image, numberOfColors: numColors); - } else if (quantizerType == QuantizerType.binary) { + } else { _lastColorMap = BinaryQuantizer(); }