static private CreateInstance ( |
||
instance | ||
return | INativeInstance |
internal static INativeInstance CreateInstance(QuantizeSettings instance)
{
if (instance == null)
return NativeInstance.Zero;
return instance.CreateNativeInstance();
}
}
public void Quantize(MagickImage image, QuantizeSettings settings) { using (INativeInstance settingsNative = QuantizeSettings.CreateInstance(settings)) { IntPtr exception = IntPtr.Zero; if (NativeLibrary.Is64Bit) { NativeMethods.X64.MagickImageCollection_Quantize(MagickImage.GetInstance(image), settingsNative.Instance, out exception); } else { NativeMethods.X86.MagickImageCollection_Quantize(MagickImage.GetInstance(image), settingsNative.Instance, out exception); } CheckException(exception); } }