public IntPtr Smush(IMagickImage image, int offset, bool stack)
{
IntPtr exception = IntPtr.Zero;
IntPtr result;
#if PLATFORM_AnyCPU
if (NativeLibrary.Is64Bit)
#endif
#if PLATFORM_x64 || PLATFORM_AnyCPU
result = NativeMethods.X64.MagickImageCollection_Smush(image.GetInstance(), (IntPtr)offset, stack, out exception);
#endif
#if PLATFORM_AnyCPU
else
#endif
#if PLATFORM_x86 || PLATFORM_AnyCPU
result = NativeMethods.X86.MagickImageCollection_Smush(image.GetInstance(), (IntPtr)offset, stack, out exception);
#endif
MagickException magickException = MagickExceptionHelper.Create(exception);
if (MagickExceptionHelper.IsError(magickException))
{
if (result != IntPtr.Zero)
{
Dispose(result);
}
throw magickException;
}
RaiseWarning(magickException);
return(result);
}