title: How to load a png image into a TImage
body: <p>I am trying to load a png image into a TImage with Delphi XE4. The png starts off in a stream: E.g.</p>
  
  <pre><code>  Stream := TMemoryStream.Create;
    try
      Stream.LoadFromFile('c:\file.png');
      Stream.Position := 0;
      Image1.Picture.Graphic.LoadFromStream(Stream);
    finally
      Stream.Free;
    end; 
  </code></pre>
  
  <p>I get an AV when I run this code. Can anyone tell me what I'm doing wrong?</p>
  
  <p>Thanks.</p>