public void SetDitherMethod(DitherMethod value) { if (NativeLibrary.Is64Bit) { NativeMethods.X64.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); } else { NativeMethods.X86.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); } }
public void SetDitherMethod(DitherMethod value) { #if PLATFORM_AnyCPU if (NativeLibrary.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU NativeMethods.X64.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU NativeMethods.X86.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); #endif }
public void SetDitherMethod(DitherMethod value) { #if ANYCPU if (NativeLibrary.Is64Bit) #endif #if WIN64 || ANYCPU NativeMethods.X64.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); #endif #if ANYCPU else #endif #if !WIN64 || ANYCPU NativeMethods.X86.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); #endif }
public static Bitmap Dither(Bitmap source, PixelFormat format, DitherMethod method) { switch (method) { case DitherMethod.FilterLite: return(FilterLite(source, format)); case DitherMethod.Sierra2: return(Sierra2(source, format)); case DitherMethod.Burkes: return(Burkes(source, format)); default: return(source); } }
public void SetDitherMethod(DitherMethod value) { #if PLATFORM_AnyCPU if (OperatingSystem.IsArm64) #endif #if PLATFORM_arm64 || PLATFORM_AnyCPU NativeMethods.ARM64.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); #endif #if PLATFORM_AnyCPU else if (OperatingSystem.Is64Bit) #endif #if PLATFORM_x64 || PLATFORM_AnyCPU NativeMethods.X64.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); #endif #if PLATFORM_AnyCPU else #endif #if PLATFORM_x86 || PLATFORM_AnyCPU NativeMethods.X86.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value); #endif }
public void Quantize(int numberColors, ColorspaceType colorspaceType, int treeDepth, DitherMethod ditherMethod, bool measureError) { this.image.QuantizeImage(numberColors, colorspaceType, treeDepth, ditherMethod, measureError); }
public void QuantizeImage(int numberColors, ColorspaceType colorspaceType, int treeDepth, DitherMethod ditherMethod, bool measureError) { this.ExecuteChecked(ImageMagick.MagickQuantizeImage, numberColors, (int)colorspaceType, treeDepth, (int)ditherMethod, measureError ? 1 : 0); }
public void Posterize(int levels, DitherMethod method, Channels channels) { IntPtr exception = IntPtr.Zero; #if ANYCPU if (NativeLibrary.Is64Bit) #endif #if WIN64 || ANYCPU NativeMethods.X64.MagickImage_Posterize(Instance, (UIntPtr)levels, (UIntPtr)method, (UIntPtr)channels, out exception); #endif #if ANYCPU else #endif #if !WIN64 || ANYCPU NativeMethods.X86.MagickImage_Posterize(Instance, (UIntPtr)levels, (UIntPtr)method, (UIntPtr)channels, out exception); #endif CheckException(exception); }