FromImage Method
FromImage(Image)
Creates a new DrawingContext from the specified Image.
Declaration
public static DrawingContext FromImage(Image image)
Parameters
Type | Name | Description |
---|---|---|
Image | image | Image from which to create the new DrawingContext. |
Returns
Type | Description |
---|---|
DrawingContext | A new DrawingContext for the specified Image. |
Remarks
Use this method to draw on the specified image. You should always call the Dispose() method to release the DrawingContext and related resources created by the FromImage(Image) method.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|