internal static INativeInstance CreateInstance(OffsetInfo instance) { if (instance == null) { return(NativeInstance.Zero); } return(instance.CreateNativeInstance()); }
internal static INativeInstance CreateInstance(OffsetInfo instance) { if (instance == null) return NativeInstance.Zero; return instance.CreateNativeInstance(); }
public void CopyPixels(MagickImage image, MagickRectangle geometry, OffsetInfo offset, Channels channels) { using (INativeInstance geometryNative = MagickRectangle.CreateInstance(geometry)) { using (INativeInstance offsetNative = OffsetInfo.CreateInstance(offset)) { IntPtr exception = IntPtr.Zero; #if ANYCPU if (NativeLibrary.Is64Bit) #endif #if WIN64 || ANYCPU NativeMethods.X64.MagickImage_CopyPixels(Instance, MagickImage.GetInstance(image), geometryNative.Instance, offsetNative.Instance, (UIntPtr)channels, out exception); #endif #if ANYCPU else #endif #if !WIN64 || ANYCPU NativeMethods.X86.MagickImage_CopyPixels(Instance, MagickImage.GetInstance(image), geometryNative.Instance, offsetNative.Instance, (UIntPtr)channels, out exception); #endif CheckException(exception); } } }