title: Resizing jpeg image after conversion from bitmap does not work
body: <p>I am converting a <code>bitmap</code> to <code>jpeg</code> and want to display the result in an image using various scales.  I am using the following code which works fine.</p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
  var
    Bmp: TBitmap;
    Jpg: TJPEGImage;
  begin
    Bmp := TBitmap.Create;
    Bmp.PixelFormat := pf32bit;
    Jpg := TJPEGImage.Create;
    try
      Bmp.LoadFromFile('0C310060.bmp');
      Jpg.Assign(Bmp);
      Jpg.SaveToFile('0C310060.jpg');
      Image1.Picture.Assign(Jpg);
      TJPEGImage(Image1.Picture.Graphic).Scale := jsEighth;
    finally
      Jpg.Free;
      Bmp.Free;
    end;
  end;
  </code></pre>
  
  <p>I have no need for the <code>jpeg</code> file on disk.  However, if I eliminate the line <code>Jpg.SaveToFile('0C310060.jpg')</code> I get an access violation.  <strong>Why?</strong>  What does <code>Jpg.SaveToFile</code> do behind the scene to prevent the access violation?</p>