I have a simple C# Console Application that places a dicom file into a stream and then Copies that stream to a .jpg file. My code creates the file but I'm unable to view the image. Below is the code I am using.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.IO;
using System.Windows.Forms;
using rzdcxLib;
using System.Drawing.Imaging;
namespace ConsoleApplication1
{
class Program
{
public static void CopyStream(Stream input, Stream output) {
byte[] buffer = new byte[8 * 1024];
int len;
while ((len = input.Read(buffer, 0, buffer.Length)) > 0) {
output.Write(buffer, 0, len);
}
}
static void Main(string[]