Reference Guide
GdPicture14 Namespace / GdPictureImaging Class / ReleaseGdPictureImage Method
A unique image identifier of the GdPicture image representing the image to release.
Example





In This Topic
    ReleaseGdPictureImage Method (GdPictureImaging)
    In This Topic
    Releases the specified GdPicture image represented by its unique image identifier from memory. Please note, that the toolkit does not release created images automatically, so releasing images after they have been used is mandatory.
    Syntax
    'Declaration
     
    
    Public Function ReleaseGdPictureImage( _
       ByVal ImageID As Integer _
    ) As GdPictureStatus
    public GdPictureStatus ReleaseGdPictureImage( 
       int ImageID
    )
    public function ReleaseGdPictureImage( 
        ImageID: Integer
    ): GdPictureStatus; 
    public function ReleaseGdPictureImage( 
       ImageID : int
    ) : GdPictureStatus;
    public: GdPictureStatus ReleaseGdPictureImage( 
       int ImageID
    ) 
    public:
    GdPictureStatus ReleaseGdPictureImage( 
       int ImageID
    ) 

    Parameters

    ImageID
    A unique image identifier of the GdPicture image representing the image to release.

    Return Value

    A member of the GdPictureStatus enumeration. If the method has been successfully followed, then the return value is GdPictureStatus.OK.
    Remarks
    It is always a best practice to release images you have created once you have no use for them. Be aware, that releasing images is mandatory, the toolkit does not release them automatically in any way.
    Example
    Performing a negative effect on a jpeg image.
    using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
    {
        // LoadInMemory parameter is set to true in order to be able to update the input file.
        int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg", true);
        gdpictureImaging.FxNegative(imageID);
        gdpictureImaging.SaveAsJPEG(imageID, "image.jpg", 75);
        gdpictureImaging.ReleaseGdPictureImage(imageID);
    }
    See Also