uses ...., ImagingComponents;
begin
FImage := TSingleImage.Create;
ConvertBitmapToImage(ASCIIImg.Picture.Bitmap, FImage);
....
FImage.SaveToFile(CopyPath);
...
end;
var
ImgStream: TMemoryStream;
begin
try
ImgStream := TMemoryStream.Create;
FImage := TMultiImage.Create;
ASCIIImg.Picture.Graphic.SaveToStream(ImgStream);
ImgStream.Position := 0;
FImage.LoadMultiFromStream(ImgStream);
finally
ImgStream.Free;
end;
var
CopyPath: string;
begin
SaveDlg.Filter := Imaging.GetImageFileFormatsFilter(False);
SaveDlg.FileName := ChangeFileExt(ExtractFileName(FFileName), '');
SaveDlg.FilterIndex := Imaging.GetFileNameFilterIndex(FFileName, False);
if SaveDlg.Execute then
begin
CopyPath := ChangeFileExt(SaveDlg.FileName, '.' +
Imaging.GetFilterIndexExtension(SaveDlg.FilterIndex, False));
FImage.SaveToFile(CopyPath);
end;
Page created in 0.013 seconds with 19 queries.