Convert BMP -> JPG  

Send By: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Date: 03/08/99

Tip accessed 625 times

 


Convert BMP to JPG:

Add 'JPeg' in the uses of your form


                procedure TForm1.Button1Click(Sender: TObject);
                var
                  MyJPEG : TJPEGImage;
                  MyBMP  : TBitmap;
                begin
                  MyBMP := TBitmap.Create;
                  with MyBMP do
                    try
                      {Cargamos el BMP}
                      {Load the BMP}	
                      LoadFromFile('YourBmpHere.BMP');
                      MyJPEG := TJPEGImage.Create;
                      with MyJPEG do begin
                        Assign(MyBMP);
                        {Grabamos el JPG}
                        {Save the JPG}
                        SaveToFile('YourJpegHere.JPEG');
                        Free;
                      end;
                    finally
                      Free;
                    end;
                end;