コード例 #1
0
ファイル: ImageDiff.cs プロジェクト: jonike/imgdiff_bindings
 public Bitmap(int width, int height, IntPtr data)
 {
     Width       = width;
     Height      = height;
     nativeImage = new NativeImage()
     {
         Width = width, Height = height, Data = data
     };
 }
コード例 #2
0
ファイル: ImageDiff.cs プロジェクト: jonike/imgdiff_bindings
        public Bitmap(Stream stream)
        {
            byte[] buffer = new byte[16 * 1024];
            byte[] allBytes;

            using (MemoryStream ms = new MemoryStream())
            {
                int read;
                while ((read = stream.Read(buffer, 0, buffer.Length)) > 0)
                {
                    ms.Write(buffer, 0, read);
                }

                allBytes = ms.ToArray();
            }

            nativeImage = Binding.LoadImage(allBytes, allBytes.Length);
            Width       = nativeImage.Width;
            Height      = nativeImage.Height;
        }
コード例 #3
0
ファイル: ImageDiff.cs プロジェクト: jonike/imgdiff_bindings
 public Bitmap(string filename)
 {
     nativeImage = Binding.LoadImage(filename);
     Width       = nativeImage.Width;
     Height      = nativeImage.Height;
 }
コード例 #4
0
ファイル: ImageDiff.cs プロジェクト: jonike/imgdiff_bindings
 private static extern NativeDiffResult DiffARGB(NativeImage left, NativeImage right, NativeDiffOptions options);
コード例 #5
0
ファイル: ImageDiff.cs プロジェクト: jonike/imgdiff_bindings
 internal static extern void SavePng(NativeImage image, string filename);
コード例 #6
0
ファイル: ImageDiff.cs プロジェクト: daseyb/imgdiff_bindings
 public Bitmap(int width, int height, IntPtr data)
 {
     Width = width;
       Height = height;
       nativeImage = new NativeImage() { Width = width, Height = height, Data = data };
 }
コード例 #7
0
ファイル: ImageDiff.cs プロジェクト: daseyb/imgdiff_bindings
        public Bitmap(Stream stream)
        {
            byte[] buffer = new byte[16 * 1024];
              byte[] allBytes;

              using (MemoryStream ms = new MemoryStream())
              {
            int read;
            while ((read = stream.Read(buffer, 0, buffer.Length)) > 0)
            {
              ms.Write(buffer, 0, read);
            }

            allBytes = ms.ToArray();
              }

              nativeImage = Binding.LoadImage(allBytes, allBytes.Length);
              Width = nativeImage.Width;
              Height = nativeImage.Height;
        }
コード例 #8
0
ファイル: ImageDiff.cs プロジェクト: daseyb/imgdiff_bindings
 public Bitmap(string filename)
 {
     nativeImage = Binding.LoadImage(filename);
       Width = nativeImage.Width;
       Height = nativeImage.Height;
 }
コード例 #9
0
ファイル: ImageDiff.cs プロジェクト: daseyb/imgdiff_bindings
 private static extern NativeDiffResult DiffARGB(NativeImage left, NativeImage right, NativeDiffOptions options);
コード例 #10
0
ファイル: ImageDiff.cs プロジェクト: daseyb/imgdiff_bindings
 internal static extern void SavePng(NativeImage image, string filename);