VintaSoft Imaging .NET SDK 14.0: Documentation for .NET developer
In This Topic
    TIFF: How to convert TIFF file to a BigTIFF file?
    In This Topic
    Here is C#/VB.NET code that shows how to convert TIFF file to a BigTIFF file:
    /// <summary>
    /// Converts standard TIFF file to a big TIFF file (TIFF file which can be bigger than 4Gb).
    /// </summary>
    public void ConvertTiffToBigTiff(string tiffFileName, string bigTiffFileName)
    {
        // open standard TIFF file
        using (Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile tiffFile = 
            new Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile(tiffFileName))
        {
            // create big TiffFile
            using (Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile bigTiffFile = 
                new Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile(
                    Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFileFormat.LittleEndian, 
                    Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFileVersion.BigTIFF))
            {
                // for each page of standard TIFF file
                foreach (Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffPage page in tiffFile.Pages)
                    // add page to a big TIFF file
                    bigTiffFile.Pages.Add(page);
    
                // save big TIFF file to a disk
                bigTiffFile.Save(bigTiffFileName);
            }
        }
    }
    
    ''' <summary>
    ''' Converts standard TIFF file to a big TIFF file (TIFF file which can be bigger than 4Gb).
    ''' </summary>
    Public Sub ConvertTiffToBigTiff(tiffFileName As String, bigTiffFileName As String)
        ' open standard TIFF file
        Using tiffFile As New Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile(tiffFileName)
            ' create big TiffFile
            Using bigTiffFile As New Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile(Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFileFormat.LittleEndian, Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFileVersion.BigTIFF)
                ' for each page of standard TIFF file
                For Each page As Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffPage In tiffFile.Pages
                    ' add page to a big TIFF file
                    bigTiffFile.Pages.Add(page)
                Next
    
                ' save big TIFF file to a disk
                bigTiffFile.Save(bigTiffFileName)
            End Using
        End Using
    End Sub