Hello,
Is it possible to save/ or export richview to image ?
Thanks
richview to any type image
-
- Site Admin
- Posts: 17564
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You can use TRVReportHelper to make images from TRichView documents.
An example can be found in demo projects:
Demos\DelphiUnicode\Assorted\Graphics\ToImage\
This demo shows how to create an image in TBitmap or TMetafile.
If you need to save another image format, you can create a bitmap and assign it.
For example, if you have image in bmp: TBitmap and want to save it as JPEG:
Similarly, you can use
- TGifImage for GIFs (Delphi includes TGifImage starting from Delphi 2007, otherwise you need thirdparty implementation)
- TPngImage for PNGs (Delphi includes TPngImage starting from Delphi 2009, otherwise you need thirdparty implementation)
- TWicImage for TIFFs (Delphi includes TWicImage starting from Delphi 2010, otherwise you need thirdparty implementation)
An example can be found in demo projects:
Demos\DelphiUnicode\Assorted\Graphics\ToImage\
This demo shows how to create an image in TBitmap or TMetafile.
If you need to save another image format, you can create a bitmap and assign it.
For example, if you have image in bmp: TBitmap and want to save it as JPEG:
Code: Select all
var jpg: TJpegImage;
jpg := TJpegImage.Create;
try
jpg.Assign(bmp);
jpg.SaveToFile(...);
finally
jpg.Free;
end;
- TGifImage for GIFs (Delphi includes TGifImage starting from Delphi 2007, otherwise you need thirdparty implementation)
- TPngImage for PNGs (Delphi includes TPngImage starting from Delphi 2009, otherwise you need thirdparty implementation)
- TWicImage for TIFFs (Delphi includes TWicImage starting from Delphi 2010, otherwise you need thirdparty implementation)