title: SSRS : image from custom code
body: <p>I am using custom code in my RDL to generate a PNG containing barcode font encoded data.</p>
  
  <p>the code itself works... if I throw it into a console app, and save the byte array it returns to a file, Windows/MSPaint/etc are able to open it no problem.</p>
  
  <p>But within the RDL, I'm having trouble showing it as an image.</p>
  
  <p>My custom code:</p>
  
  <pre><code>Public Function BarCode_39(ByVal text as String) As Object
      ... generate System.Drawing.BitMap
      bitmap.Save(memStream, ImageFormat.Png)
      memstream.Flush()
      return memstream.ToArray()
  End Function
  </code></pre>
  
  <p>tried setting the function to return Byte()... nothing seems to work</p>
  
  <p>thoughts? ideas?</p>