public void CodecsJbig2OptionsExample(Stream inStream, Stream outStreamJbig2)
{
RasterCodecs codecs = new RasterCodecs();
RasterImage srcImage = codecs.Load(inStream);
// Save as JBIG2 with Template #3
codecs.Options.Jbig2.Save.RemoveMarker = true;
codecs.Options.Jbig2.Save.RemoveHeaderSegment = true;
codecs.Options.Jbig2.Save.RemoveEopSegment = true;
codecs.Options.Jbig2.Save.RemoveEofSegment = true;
codecs.Options.Jbig2.Save.ImageTypicalPredictionOn = true;
codecs.Options.Jbig2.Save.ImageTemplateType = 3;
codecs.Save(srcImage, outStreamJbig2, RasterImageFormat.Jbig2, 1);
// Clean up
srcImage.Dispose();
}
Public Sub CodecsJbig2OptionsExample(ByVal inStream As Stream, ByVal outStreamJbig2 As Stream)
Dim codecs As RasterCodecs = New RasterCodecs()
Dim srcImage As RasterImage = codecs.Load(inStream)
' Save as JBIG2 with Template #3
codecs.Options.Jbig2.Save.RemoveMarker = True
codecs.Options.Jbig2.Save.RemoveHeaderSegment = True
codecs.Options.Jbig2.Save.RemoveEopSegment = True
codecs.Options.Jbig2.Save.RemoveEofSegment = True
codecs.Options.Jbig2.Save.ImageTypicalPredictionOn = True
codecs.Options.Jbig2.Save.ImageTemplateType = 3
codecs.Save(srcImage, outStreamJbig2, RasterImageFormat.Jbig2, 1)
' Clean up
srcImage.Dispose()
End Sub
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2