ConvertTo32BppARGB Method (GdPictureImaging)
In This Topic
Converts a GdPicture image to a 32-bit ARGB color image.
8 bits each are used for the alpha, red, green, and blue components.
Syntax
Parameters
- ImageID
- GdPicture image identifier.
Return Value
A member of the GdPictureStatus enumeration.
Example
Converting a selected image to a 32-bit ARGB color image and saving the result into a PNG file.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
// Open an image file. An empty string allows the control to prompt for selecting a file.
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("");
// Convert the image.
gdpictureImaging.ConvertTo32BppARGB(imageID);
gdpictureImaging.SaveAsPNG(imageID, "output.png");
// Release used resources.
gdpictureImaging.ReleaseGdPictureImage(imageID);
}
Example
Converting a selected image to a 32-bit ARGB color image and saving the result into a PNG file.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
// Open an image file. An empty string allows the control to prompt for selecting a file.
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("");
// Convert the image.
gdpictureImaging.ConvertTo32BppARGB(imageID);
gdpictureImaging.SaveAsPNG(imageID, "output.png");
// Release used resources.
gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also