DotImage Knowledgebase

Home : Combine images into a multipage TIFF using AppendTIFF in ImgX
Q10155 - HOWTO: Combine images into a multipage TIFF using AppendTIFF in ImgX

ImgX can be used to combine multiple images into a single multipage TIFF file.  An easy way to do this and keep memory usage low is to use the AppendTIFF method.  Here is an example:

Private Sub CombineImagesToTiff(ByVal outputFile As String, ByRef inputFiles() As String)
    Dim i As Long
    Dim lb As Long
    Dim ub As Long
    Dim exists As Boolean
   
    Dim ix As ImgX
    Set ix = New ImgX
   
    exists = Dir(outputFile) <> ""
    lb = LBound(inputFiles)
    ub = UBound(inputFiles) - 1
   
    For i = lb To ub
        ix.Import.FromFile inputFiles(i), 0
        If Not exists Then
            ix.Export.ToFile outputFile, ixfsTIF
            exists = True
        Else
            ix.Export.AppendTIFF outputFile
        End If
    Next
   
    Set ix = Nothing
End Sub
Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2013. InstantASP Ltd. All Rights Reserved

preload preload preload