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
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.
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);
}
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