Jb2EncoderSave Method (Stream, AtalaImage, ProgressEventHandler) |
Compresses a single
AtalaImage as a JBIG2 encoded file.
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 long Save(
Stream stream,
AtalaImage image,
ProgressEventHandler progress
)
Public Overrides Function Save (
stream As Stream,
image As AtalaImage,
progress As ProgressEventHandler
) As Long
Parameters
- stream
- Type: System.IOStream
The input stream. - image
- Type: Atalasoft.ImagingAtalaImage
AtalaImage to be written as JBIG2, PDF or embedded stream to PDF. - progress
- Type: Atalasoft.ImagingProgressEventHandler
A progress Delegate. Pass in null (Nothing in VB, 0 in C++) to ignore progress events.
Return Value
Type:
Int64 Returns the number of bytes encoded.
Exceptions Remarks To append to an existing image, set
Append to true.
Examples using Atalasoft.Imaging;
using Atalasoft.Imaging.Codec.Jbig2;
...
FileStream fs = new FileStream(targetFileName, FileMode.Create);
AtalaImage image = new AtalaImage(sourceFilename);
Jb2Encoder jb2e = new Jb2Encoder();
jb2e.ExportFormat = Jb2ExportFormat.Jb2;
jb2e.Save(fs, image, null);
using namespace Atalasoft::Imaging;
using namespace Atalasoft::Imaging::Codec::Jbig2;
...
FileStream* fs = new FileStream(targetFilename, FileMode::Create);
AtalaImage* image = new AtalaImage(sourcefilename);
Jb2Encoder* jb2e = new Jb2Encoder();
jb2e->ExportFormat = Jb2ExportFormat::Jb2;
jb2e->Save(fs, image, null);
Save Single VB (Visual Basic)
Imports Atalasoft.Imaging
Imports Atalasoft.Imaging.Codec.Jbig2
...
Dim fs As FileStream = New FileStream(targetFileName, FileMode.Create)
Dim image As AtalaImage = New AtalaImage(sourceFilename)
Dim jb2e As Jb2Encoder = New Jb2Encoder()
jb2e.ExportFormat = Jb2ExportFormat.Jb2
jb2e.Save(fs, image, null)
See Also