Esempio n. 1
0
 public Image CreateImage(MemoryFlags flags, ImageFormat format, ImageDescriptor descriptor)
 {
     return CreateImage(flags, format, descriptor, IntPtr.Zero);
 }
Esempio n. 2
0
        public Image CreateImage(MemoryFlags flags, ImageFormat format, ImageDescriptor descriptor, IntPtr hostAddress)
        {
            if (hostAddress == IntPtr.Zero && (flags & (MemoryFlags.UseHostPointer | MemoryFlags.CopyHostPointer)) != 0)
                throw new ArgumentException("Invalid host address.");
            if (hostAddress != IntPtr.Zero && (flags & (MemoryFlags.UseHostPointer | MemoryFlags.CopyHostPointer)) == 0)
                throw new ArgumentException("Invalid host address.");

            ImageSafeHandle handle = UnsafeNativeMethods.CreateImage(Handle, flags, ref format, ref descriptor, hostAddress);
            return new Image(this, handle);
        }
Esempio n. 3
0
 public Image CreateImage(MemoryFlags flags, ImageFormat format, ImageDescriptor descriptor)
 {
     return(CreateImage(flags, format, descriptor, IntPtr.Zero));
 }