Click or drag to resize

Jb2Decoder Class

The class derives from ImageDecoder and decodes JBIG2 images. Jb2Decoder may access to an existing JBIG2 file or JBIG2 embedded stream (StreamForPdf, refer to Jb2ExportFileFormat).
Inheritance Hierarchy
SystemObject
  Atalasoft.Imaging.CodecImageDecoder
    Atalasoft.Imaging.CodecMultiFramedImageDecoder
      Atalasoft.Imaging.Codec.Jbig2Jb2Decoder

Namespace:  Atalasoft.Imaging.Codec.Jbig2
Assembly:  Atalasoft.dotImage.Jbig2 (in Atalasoft.dotImage.Jbig2.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public class Jb2Decoder : MultiFramedImageDecoder, IDisposable

The Jb2Decoder type exposes the following members.

Constructors
  NameDescription
Public methodJb2Decoder
Creates a gcnew instance of a Jb2Decoder.
Top
Properties
  NameDescription
Protected propertyScaleDownFactor
Protected propertySpaceUpFactor
Public propertySupportedImageType Obsolete.
Returns the ImageType that the implemented decoder class supports.
(Inherited from ImageDecoder.)
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by the Jb2Decoder
Protected methodDispose(Boolean)
Releases the unmanaged resources used by the Jb2Decoder and optionally releases the managed resources
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetFrameCount
Returns the number of frames in the image
(Overrides MultiFramedImageDecoderGetFrameCount(Stream).)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetImageInfo(Stream)
Returns information about a JBIG2 image such as width, height, and resolution.
(Overrides ImageDecoderGetImageInfo(Stream).)
Public methodGetImageInfo(Stream, Int32)
Returns information about a JBIG2 image such as width, height, and resolution.
(Overrides MultiFramedImageDecoderGetImageInfo(Stream, Int32).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIsValidFormat
Returns true if the specified Stream is a JBIG2 image.
(Overrides ImageDecoderIsValidFormat(Stream).)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodCode exampleRead(Stream, ProgressEventHandler)
Decodes a JBIG2 image from a stream and returns an AtalaImage with the decoded image data.
(Overrides ImageDecoderRead(Stream, ProgressEventHandler).)
Public methodRead(Stream, Int32, ProgressEventHandler)
Decodes a JBIG2 image from a stream and returns an AtalaImage with the decoded image data.
(Overrides MultiFramedImageDecoderRead(Stream, Int32, ProgressEventHandler).)
Public methodCode exampleReadRegion
Decodes a specified region of a JBIG2 image given a source Stream.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks
To add the ability to decode JBIG2 images, simply add an instance of the Jb2Decoder to the DecoderDictionary collection in the RegisteredDecoders class. See the below example.
Examples
Jb2 decoder C# (C#)
using Atalasoft.Imaging.Codec.Jpeg2000;  
...  
Jp2Decoder jp2 = new Jp2Decoder();  
RegisteredDecoders.Decoders.Add(jp2);
Jb2 Decoder VB (Visual Basic)
Imports Atalasoft.Imaging.Codec.Jpeg2000
...
Dim jp2 As Jp2Decoder = New Jp2Decoder()
RegisteredDecoders.Decoders.Add(jp2)
Jb2 Decoder C++ (CPP)
using namespace Atalasoft::Imaging::Codec;
...
Jb2Decoder jb2 = new Jb2Decoder();  
RegisteredDecoders::Decoders::Add(jb2);
See Also