Jb2DecoderRead Method (Stream, ProgressEventHandler) |
Decodes a JBIG2 image from a stream and returns an
AtalaImage with the decoded image data.
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 override AtalaImage Read(
Stream stream,
ProgressEventHandler progress
)
Public Overrides Function Read (
stream As Stream,
progress As ProgressEventHandler
) As AtalaImage
Parameters
- stream
- Type: System.IOStream
The stream to read. - progress
- Type: Atalasoft.ImagingProgressEventHandler
A progress Delegate. Pass in null (Nothing in VB, 0 in C++) to ignore progress events.
Return Value
Type:
AtalaImage Returns an
AtalaImage containing the decoded JBIG2 image.
Exceptions Exception | Condition |
---|
| Thrown if there is an error reading the image data. |
Remarks Overrides an abstract method in ImageDecoder.
Examples using Atalasoft.Imaging;
using Atalasoft.Imaging.Codec.Jbig2;
...
FileStream fs = new FileStream(sourceFilename, FileMode.Open);
Jb2Decoder jb2d = new Jb2Decoder();
AtalaImage target = jb2d.Read(fs, null);
using namespace Atalasoft::Imaging;
using namespace Atalasoft::Imaging::Codec::Jbig2;
...
FileStream* fs = new FileStream(sourceFilename, FileMode::Open);
Jb2Decoder* jb2d = new Jb2Decoder();
AtalaImage* target = jb2d->Read(fs, i, 0);
decode single image VB (Visual Basic)
Imports Atalasoft.Imaging
Imports Atalasoft.Imaging.Codec.Jbig2
...
Dim fs As FileStream = New FileStream(sourceFilename, FileMode.Open)
Dim jb2d As Jb2Decoder = New Jb2Decoder()
Dim target As AtalaImage = jb2d.Read(fs, Nothing)
See Also