GdPicture.NET Reference Guide
GetGraphicsFromGdPictureImage Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : GetGraphicsFromGdPictureImage Method
GdPicture Image Identifier. The Image from the graphics will be associated.
Gets the Graphics object associated with a GdPicture Image.
Syntax
'Declaration
 
Public Function GetGraphicsFromGdPictureImage( _
   ByVal ImageID As Integer _
) As Graphics
public Graphics GetGraphicsFromGdPictureImage( 
   int ImageID
)
public function GetGraphicsFromGdPictureImage( 
    ImageID: Integer
): Graphics; 
public function GetGraphicsFromGdPictureImage( 
   ImageID : int
) : Graphics;
public: Graphics* GetGraphicsFromGdPictureImage( 
   int ImageID
) 
public:
Graphics^ GetGraphicsFromGdPictureImage( 
   int ImageID
) 

Parameters

ImageID
GdPicture Image Identifier. The Image from the graphics will be associated.

Return Value

A Graphics Object associated with this GdPicture Image.
Remarks

Use the GetStat() method to see if this method Succeeded.

A Graphics object cannot be created from an image that has an indexed pixel format.

Example
How to retrieve graphics object from a GdPicture image.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim gr As Drawing.Graphics = oGdPictureImaging.GetGraphicsFromGdPictureImage(ImageID)
   'doing some external processing on the graphics object
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members