VintaSoft Imaging .NET SDK 12.4: Documentation for .NET developer
In This Topic
    JBIG2: Overview
    In This Topic
    JBIG2 is an image compression standard for bi-level images and it is suitable for both lossless and lossy compression.
    JBIG2 compression in lossless mode can compress bi-level image 2-5 times effectively than CCITT Fax Group 4 compression.
    JBIG2 compression in lossy mode can compress bi-level image 5-10 times effectively than CCITT Fax Group 4 compression.


    VintaSoft JBIG2 .NET Plug-in has a set of classes for easy manipulation with JBIG2 images.

    Jbig2File class

    Jbig2File class allows to:
    Here is C#/VB.NET code that shows how to create new JBIG2 file in big-endian format:
    Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File jbig2Doc = 
        new Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File();
    
    Dim jbig2Doc As New Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File()
    


    Here is C#/VB.NET code that shows how to load an existing JBIG2 file:
    Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File jbig2Doc = 
        new Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File("document.jb2");
    
    Dim jbig2Doc As New Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File("document.jb2")
    


    Jbig2PageCollection class

    Jbig2PageCollection class allows to:
    Here is C#/VB.NET code that shows how to load multipage JBIG2 file, add JPEG image to the end of JBIG2 file, insert PNG image at the beginning of JBIG2 file and remove third page from JBIG2 file:
    Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File jbig2Doc = 
        new Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File("document.jb2");
    jbig2Doc.Pages.Add(new Vintasoft.Imaging.VintasoftImage("image.jpg"));
    jbig2Doc.Pages.Insert(0, new Vintasoft.Imaging.VintasoftImage("image.png"));
    jbig2Doc.Pages.RemoveAt(2);
    jbig2Doc.SaveChanges();
    
    Dim jbig2Doc As New Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File("document.jb2")
    jbig2Doc.Pages.Add(New Vintasoft.Imaging.VintasoftImage("image.jpg"))
    jbig2Doc.Pages.Insert(0, New Vintasoft.Imaging.VintasoftImage("image.png"))
    jbig2Doc.Pages.RemoveAt(2)
    jbig2Doc.SaveChanges()
    


    Jbig2Page class

    Jbig2Page class allows to:
    Here is C#/VB.NET code that shows how to get the first page of JBIG2 file as Image:
    Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File jbig2Doc = 
        new Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File("document.jb2");
    Vintasoft.Imaging.VintasoftImage pageImage = jbig2Doc.Pages[0].GetImage();
    
    Dim jbig2Doc As New Vintasoft.Imaging.Codecs.ImageFiles.Jbig2.Jbig2File("document.jb2")
    Dim pageImage As Vintasoft.Imaging.VintasoftImage = jbig2Doc.Pages(0).GetImage()