ImageMagick.NativeLibraryLoader.Copy C# (CSharp) Method

Copy() public static method

public static Copy ( Stream source, Stream destination ) : void
source Stream
destination Stream
return void
    public static void Copy(Stream source, Stream destination)
    {
#if NET20
      byte[] buffer = new byte[16384];
      int bytesRead;

      while ((bytesRead = source.Read(buffer, 0, buffer.Length)) > 0)
      {
        destination.Write(buffer, 0, bytesRead);
      }
#else
      source.CopyTo(destination);
#endif
    }