VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging.Codecs.ImageFiles.Tiff Namespace / TiffFile Class
Members Example



In This Topic
    TiffFile Class
    In This Topic
    Provides low-level functions for manipulating TIFF file.
    Object Model
    TiffFile ClassTiffImageFileDirectory ClassTiffPageCollection ClassTiffPage ClassImageFileSource Class
    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
    This example 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: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also