private INativeInstance CreateNativeInstance()
    {
      NativeQuantizeSettings instance = new NativeQuantizeSettings();
      instance.SetColors(Colors);
      instance.SetColorSpace(ColorSpace);
      instance.SetDitherMethod(DitherMethod.HasValue ? DitherMethod.Value : ImageMagick.DitherMethod.No);
      instance.SetMeasureErrors(MeasureErrors);
      instance.SetTreeDepth(TreeDepth);

      return instance;
    }
Exemple #2
0
        private static INativeInstance CreateNativeInstance(IQuantizeSettings settings)
        {
            var instance = new NativeQuantizeSettings();

            instance.SetColors(settings.Colors);
            instance.SetColorSpace(settings.ColorSpace);
            instance.SetDitherMethod(settings.DitherMethod ?? ImageMagick.DitherMethod.No);
            instance.SetMeasureErrors(settings.MeasureErrors);
            instance.SetTreeDepth(settings.TreeDepth);

            return(instance);
        }
Exemple #3
0
        private INativeInstance CreateNativeInstance()
        {
            NativeQuantizeSettings instance = new NativeQuantizeSettings();

            instance.SetColors(Colors);
            instance.SetColorSpace(ColorSpace);
            instance.SetDitherMethod(DitherMethod ?? ImageMagick.DitherMethod.No);
            instance.SetMeasureErrors(MeasureErrors);
            instance.SetTreeDepth(TreeDepth);

            return(instance);
        }