Copying half of tiff image into new tiff file
Copying half of tiff image into new tiff file
Can you provide me with sample code to copy the lower half of a tiff image and create a new tiff file with the copied area. Thanks in advance.
Re: Copying half of tiff image into new tiff file
Code: Select all
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oGdPictureImaging As New GdPicture.GdPictureImaging
Dim ImageID As Integer
oGdPictureImaging.SetLicenseNumber("XXX")
ImageID = oGdPictureImaging.CreateGdPictureImageFromFile("")
oGdPictureImaging.Crop(ImageID, 0, CInt(oGdPictureImaging.GetHeight(ImageID) / 2) - 1, oGdPictureImaging.GetWidth(ImageID), CInt(oGdPictureImaging.GetHeight(ImageID) / 2))
oGdPictureImaging.SaveAsTIFF(ImageID, "c:\test.tif", TiffCompression.TiffCompressionCCITT4)
oGdPictureImaging.ReleaseGdPictureImage(ImageID)
End Sub
Who is online
Users browsing this forum: No registered users and 2 guests