xtd 0.2.0
Loading...
Searching...
No Matches

◆ save() [1/3]

void xtd::drawing::image::save ( const xtd::string filename) const

Saves this xtd::drawing::image to the specified file or stream.

Parameters
filenameA string that contains the name of the file to which to save this xtd::drawing::image.
Remarks
If no encoder exists for the file format of the image, the Portable Network Graphics (PNG) encoder is used. When you use the xtd::drawing::image::save method to save a graphic image as a Windows Metafile Format (WMF) or Enhanced Metafile Format (EMF) file, the resulting file is saved as a Portable Network Graphics (PNG) file. This behavior occurs because the GDI+ component of the .NET Framework does not have an encoder that you can use to save files as .wmf or .emf files.
Saving the image to the same file it was constructed from is not allowed and throws an exception.
Examples
image_xpm.cpp.