Esempio n. 1
0
 public Bitmap(int width, int height, IntPtr data)
 {
     Width       = width;
     Height      = height;
     nativeImage = new NativeImage()
     {
         Width = width, Height = height, Data = data
     };
 }
Esempio n. 2
0
        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;
        }
Esempio n. 3
0
 public Bitmap(string filename)
 {
     nativeImage = Binding.LoadImage(filename);
     Width       = nativeImage.Width;
     Height      = nativeImage.Height;
 }
Esempio n. 4
0
 private static extern NativeDiffResult DiffARGB(NativeImage left, NativeImage right, NativeDiffOptions options);
Esempio n. 5
0
 internal static extern void SavePng(NativeImage image, string filename);
Esempio n. 6
0
 public Bitmap(int width, int height, IntPtr data)
 {
     Width = width;
       Height = height;
       nativeImage = new NativeImage() { Width = width, Height = height, Data = data };
 }
Esempio n. 7
0
        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;
        }
Esempio n. 8
0
 public Bitmap(string filename)
 {
     nativeImage = Binding.LoadImage(filename);
       Width = nativeImage.Width;
       Height = nativeImage.Height;
 }
Esempio n. 9
0
 private static extern NativeDiffResult DiffARGB(NativeImage left, NativeImage right, NativeDiffOptions options);
Esempio n. 10
0
 internal static extern void SavePng(NativeImage image, string filename);