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; }
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); }
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); }