I didn't find any answers to this question (may be because search function for this forum is ugly).
How can I save an image from TRichViewEdit to a file? Also I need to know what format it has (BMP, PNG, JPG, GIF) if it's important for saving.
How to save an image from RVE to file?
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
You can get the graphic object at the position of caret using GetCurrentPictureInfo method, and save using gr.SaveToFile.
The problem is in finding the proper file extension.
This extension is returned by the function GraphicExtension:
ext := GraphicExtension(TGraphicClass(gr.ClassType));
This function works only for graphic classes with registered file extensions.
They can be registered using TPicture.RegisterFileFormat procedure. They are already registered for standard graphic classes.
The problem is in finding the proper file extension.
This extension is returned by the function GraphicExtension:
ext := GraphicExtension(TGraphicClass(gr.ClassType));
This function works only for graphic classes with registered file extensions.
They can be registered using TPicture.RegisterFileFormat procedure. They are already registered for standard graphic classes.