GdPicture.NET Reference Guide
GetHeight Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : GetHeight Method
GdPicture image identifier.
Returns the heightof a GdPicture image in pixels.
Syntax
'Declaration
 
Public Function GetHeight( _
   ByVal ImageID As Integer _
) As Integer
public int GetHeight( 
   int ImageID
)
public function GetHeight( 
    ImageID: Integer
): Integer; 
public function GetHeight( 
   ImageID : int
) : int;
public: int GetHeight( 
   int ImageID
) 
public:
int GetHeight( 
   int ImageID
) 

Parameters

ImageID
GdPicture image identifier.

Return Value

Height in pixels.
Example
Cropping from a jpeg image.
using (GdPictureImaging gdpictureImaging = new GdPictureImaging())
{
    int imageID = gdpictureImaging.CreateGdPictureImageFromFile("image.jpg");
 
    // Remove 5% all around the image.
    int height = gdpictureImaging.GetHeight(imageID);
    int width = gdpictureImaging.GetWidth(imageID);
    gdpictureImaging.Crop(imageID, width * 5 / 100, height * 5 / 100, width * 90 / 100, height * 90 / 100);
    
    gdpictureImaging.SaveAsPNG(imageID, "crop.png");
    gdpictureImaging.ReleaseGdPictureImage(imageID);
}
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members