title: System.ArgumentException: "Parameter is not Valid" Memorystream to Image
body: <p>I have checked other StackOverflow Questions but none seem to help, as most of them work with a "base64string" this wont help me cause my byte[] is encoded with Windows-1252.</p>
  
  <p><strong>My Problem:</strong></p>
  
  <p>I'm using a Barcode Scanner to make a Picture, I use <code>Encoding.GetEncoding("Windows-1252").GetString(e.Buffer))</code>. e is the <code>DataaReceivedEventArgs</code> and it gives me a bytearray.</p>
  
  <p>I have to convert it to a string because I have to cut some parts out of the response this step has to stay.</p>
  
  <p>I then use <code>Encoding.GetEncoding("Windows-1252").GetBytes(response)</code> to convert it to a ByteArray.</p>
  
  <p>I then just make a <code>MemoryStream</code> and use it in <code>Image.FromStream(ms)</code>. The Problem is it <em>WORKS</em> the first time without any problems. But after the Second time it gives me the Invalid Parameter Exception.</p>
  
  <pre><code>  byte[] bBytes = await responseZuBytesArray();
  
              using (MemoryStream ms = new MemoryStream(bBytes))
              {
                  pcbBildAnzeige.SizeMode = PictureBoxSizeMode.StretchImage;
                  pcbBildAnzeige.Image = Image.FromStream(ms);
              }
  
              tIsStarted = false;
  </code></pre>
  
  <p>i have tried setting the Position of the MemoryStream, tried to convert it to a Bitmap first. i have tried so much but i think there is something simple im just not seeing thats why im asking here</p>