GdPicture.NET Reference Guide
GetHeightInches Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : GetHeightInches Method
GdPicture Image Identifier.
Returns the height of a GdPicture image in inches .
Syntax
'Declaration
 
Public Function GetHeightInches( _
   ByVal ImageID As Integer _
) As Double
public double GetHeightInches( 
   int ImageID
)
public function GetHeightInches( 
    ImageID: Integer
): Double; 
public function GetHeightInches( 
   ImageID : int
) : double;
public: double GetHeightInches( 
   int ImageID
) 
public:
double GetHeightInches( 
   int ImageID
) 

Parameters

ImageID
GdPicture Image Identifier.

Return Value

Height in inches.
Example
Resizing the image to twice its size.
Dim oGdPictureImaging As New GdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   Dim Width As Double = oGdPictureImaging.GetWidthInches(ImageID)
   Dim Height As Double = oGdPictureImaging.GetHeightInches(ImageID)
   Dim WidthPixels As Integer = CInt(Width * oGdPictureImaging.GetHorizontalResolution(ImageID))
   Dim HeightPixels As Integer = CInt(Height * oGdPictureImaging.GetVerticalResolution(ImageID))
   oGdPictureImaging.Resize(ImageID, WidthPixels * 2, HeightPixels * 2, Drawing2D.InterpolationMode.Bicubic)
   oGdPictureImaging.SaveAsPNG(ImageID, "output.png")
   oGdPictureImaging.ReleaseGdPictureImage(ImageID)
Else
   MessageBox.Show("Error: " + oGdPictureImaging.GetStat().ToString())
End If
See Also

Reference

GdPictureImaging Class
GdPictureImaging Members