procedure TForm1.WmfToJPG(FicheroJPG:string);
var
MetaFile:TMetafile;
BMP:TBitmap;
JPG:TJpegImage;
begin
If clipboard.HasFormat(CF_METAFILEPICT)
then begin
Metafile:=TMetaFile.create;
Bmp:=TBitmap.create;
JPG:=TJpegImage.Create;
MetaFile.Assign(clipboard);
with Bmp do
begin
Height:=Metafile.Height;
Width:=Metafile.Width;
Canvas.Draw(0,0,MetaFile);
end;
JPG.Assign(BMP);
JPG.SaveToFile(FicheroJPG);
bmp.Free;
MetaFile.Free;
JPG.Free;
end;
end;