コード例 #1
0
 public void SetDitherMethod(DitherMethod value)
 {
     if (NativeLibrary.Is64Bit)
     {
         NativeMethods.X64.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value);
     }
     else
     {
         NativeMethods.X86.QuantizeSettings_SetDitherMethod(Instance, (UIntPtr)value);
     }
 }
コード例 #2
0
 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
 }
コード例 #3
0
     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
     }
コード例 #4
0
        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);
            }
        }
コード例 #5
0
 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
 }
コード例 #6
0
ファイル: Image.cs プロジェクト: karamanolev/NImageMagick
 public void Quantize(int numberColors, ColorspaceType colorspaceType, int treeDepth, DitherMethod ditherMethod, bool measureError)
 {
     this.image.QuantizeImage(numberColors, colorspaceType, treeDepth, ditherMethod, measureError);
 }
コード例 #7
0
 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
 }
コード例 #8
0
 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);
 }
コード例 #9
0
ファイル: MagickImage.cs プロジェクト: dlemstra/Magick.NET
 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);
 }