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

◆ from_image()

static graphics xtd::drawing::graphics::from_image ( const xtd::drawing::image image)
static

Creates a new xtd::drawing::graphics from the specified xtd::drawing::image.

Parameters
imagextd::drawing::image from which to create the new xtd::drawing::graphics.
Returns
This method returns a new xtd::drawing::graphics for the specified Image.
Remarks
If the image has an indexed pixel format, this method throws an exception with the message, "A xtd::drawing::graphics object cannot be created from an image that has an indexed pixel format." The indexed pixel formats are shown in the following list.
You can save the indexed image as another format by using the xtd::drawing:image::save(xtd::string, xtd::drawing::imaging::image_format) method and then retrieve a xtd::drawing::graphics object for the new image.
This method also throws an exception if the image has any of the following pixel formats.