I've found a lot of examples for Multipage Tiff but no one is what i need:
I've a multipage Tif and i need to create another Tif (with another name)
the differenze from source to destination is just in a resolution changing
but I fail! cause the destination is only with first page
i try a lot of changhes but....
here is the worng code:
Code: Select all
dim OldFullFileName As String, ByVal NewFullFileName As String
dim ByVal bChangeResolution As Boolean
dim nNativeImageHandle as long
Dim nPages As Integer
Dim TotPages As Integer
Dim retValue As Long
With gdImage
.SetLicenseNumber (GDPICTURELICENSE)
Call .TiffCreateMultiPageFromFile(OldFullFileName)
nNativeImageHandle = .GetNativeImage()
TotPages = .TiffGetPageCount(nNativeImageHandle)
For nPages = 1 To TotPages
Call .TiffSelectPage(nNativeImageHandle, nPages)
nNativeImageHandle = .GetNativeImage()
If bChangeResolution Then 'Changing resolution
If nPages = 1 Then
Call .TiffSaveAsNativeMultiPage(NewFullFileName)
Else
.TiffAddToNativeMultiPage (nNativeImageHandle)
End If
.CloseImage (nNativeImageHandle)
Next
.TiffCloseNativeMultiPage
end with