CreateThumbnailHQ(Int32,Int32,Int32) Method
In This Topic
Creates a High Quality thumbnail of custom size from a GdPicture image.
Syntax
'Declaration
Public Overloads Function CreateThumbnailHQ( _
ByVal As Integer, _
ByVal As Integer, _
ByVal As Integer _
) As Integer
public int CreateThumbnailHQ(
int ,
int ,
int
)
public function CreateThumbnailHQ(
: Integer;
: Integer;
: Integer
): Integer;
public function CreateThumbnailHQ(
: int,
: int,
: int
) : int;
public: int CreateThumbnailHQ(
int ,
int ,
int
)
public:
int CreateThumbnailHQ(
int ,
int ,
int
)
Parameters
- ImageID
- GdPicture image identifier. The image from which the HQ thumbnail must be created.
- Width
- The width of the thumbnail to create.
- Height
- The height of the thumbnail to create.
Return Value
GdPicture image identifier. The thumbnail Image. The ReleaseGdPictureImage() method must be subsequently used to release the image from the memory.
Example
Generating a high quality custom size thumbnail from a jpeg image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg");
// Create a thumbnail that is 100 pixels width and 200 pixels height.
int thumbnailID = gdpictureImaging.CreateThumbnailHQ(imageID, 100, 200);
gdpictureImaging.SaveAsPNG(thumbnailID, "thumbnail.png");
// Release used resources.
gdpictureImaging.ReleaseGdPictureImage(thumbnailID);
gdpictureImaging.ReleaseGdPictureImage(imageID);
}
Example
Generating a high quality custom size thumbnail from a jpeg image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg");
// Create a thumbnail that is 100 pixels width and 200 pixels height.
int thumbnailID = gdpictureImaging.CreateThumbnailHQ(imageID, 100, 200);
gdpictureImaging.SaveAsPNG(thumbnailID, "thumbnail.png");
// Release used resources.
gdpictureImaging.ReleaseGdPictureImage(thumbnailID);
gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also