Как пофиксить Undeclared identifier: 'SaveToStream'?

Рейтинг: 1Ответов: 1Опубликовано: 25.12.2014
procedure TForm1.SpeedButton1Click(Sender: TObject);
var
  Ini : TIniFile;
  ms : TMemoryStream;
begin
  Ini := TIniFile.Create(ExtractFilePath(Application.ExeName) + 'test.ini');
  try
    ms := TMemoryStream.Create;
    try
      Image1.Picture.SaveToStream(ms);
      ms.Position := 0;
      Ini.WriteBinaryStream('General', 'Picture', ms);
    finally
      ms.Free;
    end;
  finally
    Ini.Free;
  end;
end;

Ответы

▲ 1Принят

Так?

Image1.Picture.Bitmap.SaveToStream(ms);