/*
TJPEGImage, Assign, SaveToFile example
This example converts a bitmap image to a jpeg file by using the Assign method.
*/ 
void __fastcall TForm1::Button1Click(TObject *Sender)
{
  //Requires "jpeg.hpp" to be included in the source file
  TJPEGImage *jp = new TJPEGImage();
  try
  {
    jp->Assign(Image1->Picture->Bitmap);
    jp->SaveToFile("c:\\oneeye.jpg");
  }
  __finally
  {
    delete jp;
  }
} 
