var jpeg: TGraphic; {CUttED} jpeg := TJpegImage.Create; try jpeg.LoadFromStream(ms); Image1.Picture.Graphic := jpeg; finally jpeg.Free; end;