Convertir BMP -> JPG  

Enviado Por: Q3 Team
Web : http://www.q3.nu
Email: dlib@q3.nu
Fecha: 03/08/99

Truco accedido 111 veces

 


Convertir BMP a JPG:

Aņade 'Jpeg' en el uses de tu 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;