I have a multipage tiff file.
It's more than 1000 pages.
I use TiffAppendPageFromGdPictureImage method but it's too slow.
The simple code is below:
Dim docNo As String = String.Empty
For Each nmf As String In System.IO.Directory.GetFileSystemEntries(Me._noMatchDirectory, "*.tif")
Dim noMatchImageID As Integer = _oGdPictureImaging.TiffCreateMultiPageFromFile(nmf)
Dim ImageID As Integer = _oGdPictureImaging.TiffCreateMultiPageFromGdPictureImage(noMatchImageID)
docNo = _cf.GetDocNoByWithoutExtension(nmf, Me._noMatchDirectory)
Dim pages As Integer = _oGdPictureImaging.TiffGetPageCount(noMatchImageID)
For i As Integer = 1 To pages - 1
_oGdPictureImaging.TiffSelectPage(noMatchImageID, i + 1)
_oGdPictureImaging.TiffAppendPageFromGdPictureImage(ImageID, noMatchImageID)
Next
_oGdPictureImaging.ReleaseGdPictureImage(noMatchImageID)
Next
Is there a faster way to do it?
thanks~
AppendPage's performance
-
- Posts: 352
- Joined: Tue Sep 27, 2011 11:47 am
Re: AppendPage's performance
Hi,
Yes, there is a different faster way. You would need to use our functions for sequential tiff writing:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... od%29.html
Basically you create a new multipage file using TiffSaveAsMultiPageFile(), add the images you want using: TiffAddToMultiPageFile() then close the file using TiffCloseMultiPageFile().
Hope this helps.
Best of luck,
Sami
Yes, there is a different faster way. You would need to use our functions for sequential tiff writing:
https://www.gdpicture.com/guides/gdpicture/v9/html/con ... od%29.html
Basically you create a new multipage file using TiffSaveAsMultiPageFile(), add the images you want using: TiffAddToMultiPageFile() then close the file using TiffCloseMultiPageFile().
Hope this helps.
Best of luck,
Sami
Who is online
Users browsing this forum: Bing [Bot] and 1 guest