GdPicture.NET Reference Guide
ResizeHeightRatio Method (GdPictureImaging)
Example 





GdPicture14 Namespace > GdPictureImaging Class : ResizeHeightRatio Method
GdPicture Image Identifier.
The new height of the image in pixel.
A member of the Drawing2D.InterPolationMode enumeration.
Resizes a GdPicture image with custom height keeping the original aspect ratio for the new width value.
Syntax

Parameters

ImageID
GdPicture Image Identifier.
NewImageHeight
The new height of the image in pixel.
InterpolationMode
A member of the Drawing2D.InterPolationMode enumeration.

Return Value

A member of the GdPictureStatus enumeration.
Remarks
This method automatically adjusts the vertical and horizontal image resolution in order to maintain the aspect ratio. If the intention is to change the aspect ratio, the SetVerticalResolution() and/or SetVHorizontalResolution() methods should be used instead.
Example
Resizing an image's height to become 500 pixels.
Dim oGdPictureImaging As New oGdPictureImaging
Dim ImageID As Integer = oGdPictureImaging.CreateGdPictureImageFromFile("input.png")
If imageId <> 0 Then
   oGdPictureImaging.ResizeHeightRatio(ImageID, 500, 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