VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
Vintasoft.Imaging.Codecs.ImageFiles.Tiff Namespace / TiffFile Class
Members Object Syntax Remarks Example Hierarchy Requirements SeeAlso
In This Topic
    TiffFile Class
    In This Topic
    Provides low-level functions for manipulating TIFF file.
    Object Model
    TiffPageCollection TiffImageFileDirectory ImageFileSource TiffFile
    Syntax
    Remarks

    Class allows to:

    • get TIFF file info
    • get collection of TIFF pages
    • get TIFF page info (see the TiffPage for more info)
    • add TIFF page
    • insert TIFF page
    • delete TIFF page
    • save TIFF page in a separate image file
    • pack TIFF file (remove unused space)

    Supported compression algorithms:
    • without compression (read / write)
    • CCITT Group 3 fax (read)
    • CCITT Group 4 fax (read / write)
    • CCITT Rle (read)
    • Macintosh Packbits (read)
    • LZW (read / write)
    • Deflate (read / write)
    • JPEG (read / write)

    Example

    Here is an example that shows how to manipulate multipage TIFF file:

    
    Class TiffFileExample
        Public Sub RunExample()
            ' [ do not forget to set your image file path here! ]
            ' open an existing image file
            Dim tiff As New Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile("c:\multipage.tif")
    
            ' save page 2 as JPEG file
            tiff.Pages(2).Save("c:\page2.jpg")
    
            ' load PNG image
            Dim image As New Vintasoft.Imaging.VintasoftImage("c:\test.png")
    
            ' add the PNG image to TIFF file
            tiff.Pages.Add(image)
    
            ' remove pages 3 and 5
            tiff.Pages.RemoveAt(3)
            tiff.Pages.RemoveAt(5)
    
            ' save changes (space used by pages 3 and 5 will be deleted from TIFF file)
            tiff.SaveChanges()
        End Sub
    
    End Class
    
    
    
    class TiffFileExample
    {
        public void RunExample()
        {
            // [ do not forget to set your image file path here! ]
            // open an existing image file
            Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile tiff = 
                new Vintasoft.Imaging.Codecs.ImageFiles.Tiff.TiffFile(@"c:\multipage.tif");
    
            // save page 2 as JPEG file
            tiff.Pages[2].Save(@"c:\page2.jpg");
    
            // load PNG image
            Vintasoft.Imaging.VintasoftImage image = 
                new Vintasoft.Imaging.VintasoftImage(@"c:\test.png");
    
            // add the PNG image to TIFF file
            tiff.Pages.Add(image);
    
            // remove pages 3 and 5
            tiff.Pages.RemoveAt(3);
            tiff.Pages.RemoveAt(5);
    
            // save changes (space used by pages 3 and 5 will be deleted from TIFF file)
            tiff.SaveChanges();
        }
    
    }
    
    

    Inheritance Hierarchy
    Requirements

    Target Platforms: .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

    See Also