JBIG2ImageGBATX1 Example for Visual Basic

Dim RasterIO As New LEADRasterIO 

 

LEADRasterView1.Raster.UnlockSupport L_SUPPORT_JBIG2, L_KEY_JBIG2 

 

RasterIO.Load LEADRasterView1.Raster, "c:\parrots.jpg", 0, 0, 1 

 

RasterIO.JBIG2ImageGBATX1 = 3 

RasterIO.JBIG2ImageGBATY1 = -1 

RasterIO.JBIG2ImageGBATX2 = 3 

RasterIO.JBIG2ImageGBATY2 = -1 

RasterIO.JBIG2ImageGBATX3 = 2 

RasterIO.JBIG2ImageGBATY3 = -2 

RasterIO.JBIG2ImageGBATX4 = -2 

RasterIO.JBIG2ImageGBATY4 = -2 

RasterIO.JBIG2ImageTemplateType = 0 

RasterIO.JBIG2ImageFlags = 0 

RasterIO.JBIG2ImageQFactor = 0 

RasterIO.JBIG2TextGBATX1 = 3 

RasterIO.JBIG2TextGBATY1 = -1 

RasterIO.JBIG2TextGBATX2 = 3 

RasterIO.JBIG2TextGBATY2 = -1 

RasterIO.JBIG2TextGBATX3 = 2 

RasterIO.JBIG2TextGBATY3 = -2 

RasterIO.JBIG2TextGBATX4 = -2 

RasterIO.JBIG2TextGBATY4 = -2 

RasterIO.JBIG2TextTemplateType = 0 

RasterIO.JBIG2TextFlags = JBIG2_TEXT_KEEPALLSYM 

RasterIO.JBIG2TextQFactor = 0 

RasterIO.JBIG2TextMinSymArea = 50 

RasterIO.JBIG2TextMinSymWidth = 1 

RasterIO.JBIG2TextMinSymHeight = 1 

RasterIO.JBIG2TextMaxSymArea = 2000 

RasterIO.JBIG2TextMaxSymWidth = 200 

RasterIO.JBIG2TextMaxSymHeight = 200 

RasterIO.JBIG2TextDifThreshold = 10 

RasterIO.JBIG2YResolution = 150 

RasterIO.JBIG2XResolution = 150 

RasterIO.JBIG2Flags = JBIG2_ENABLE_DICTIONARY 

 

 

RasterIO.Save LEADRasterView1.Raster, "c:\1.jb2", FILE_JBIG2, 1, QFACTOR_LEAD_0, 0