procedure TForm1.Button1Click(Sender: TObject);
var
Icono:TIcon;
Bitmap:TBitmap;
Jpg:TJpegImage;
begin
{Creamos para uso temporal}
{Create to temporal use}
Icono:=TIcon.create;
Bitmap:=TBitmap.create;
Jpg:=TJpegImage.Create;
{Cargamos el .ICo}
{Load the .ICO}
Icono.LoadFromFile('C:\DiscoC\Delphi3\Images\Icons\Chip.ico');
{Hacemos la conversion}
{Make the conversion}
Bitmap.Height := Icono.Height;
Bitmap.Width := Icono.Width;
Bitmap.Canvas.Draw(0, 0, Icono);
Jpg.Assign(Bitmap);
{Grabamos el JPG}
{Save the JPG}
Jpg.SaveToFile('c:\kk\Chip.Jpg');
Icono.Free;
Bitmap.Free;
Jpg.Free;
end;
|