@@ -795,6 +795,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
795
795
data , position , end ];
796
796
break ;
797
797
case 6 : // ImmediateTextRegion
798
+ case 7 : // ImmediateLosslessTextRegion
798
799
var textRegion = {};
799
800
textRegion .info = readRegionSegmentInformation (data , position );
800
801
position += RegionSegmentInformationFieldLength ;
@@ -841,13 +842,14 @@ var Jbig2Image = (function Jbig2ImageClosure() {
841
842
args = [textRegion , header .referredTo , data , position , end ];
842
843
break ;
843
844
case 38 : // ImmediateGenericRegion
845
+ case 39 : // ImmediateLosslessGenericRegion
844
846
var genericRegion = {};
845
847
genericRegion .info = readRegionSegmentInformation (data , position );
846
848
position += RegionSegmentInformationFieldLength ;
847
849
var genericRegionSegmentFlags = data [position ++];
848
850
genericRegion .mmr = !!(genericRegionSegmentFlags & 1 );
849
851
genericRegion .template = (genericRegionSegmentFlags >> 1 ) & 3 ;
850
- genericRegion .prediction = !!(genericRegionSegmentFlags & 4 );
852
+ genericRegion .prediction = !!(genericRegionSegmentFlags & 8 );
851
853
if (!genericRegion .mmr ) {
852
854
var atLength = genericRegion .template == 0 ? 4 : 1 ;
853
855
var at = [];
@@ -988,6 +990,10 @@ var Jbig2Image = (function Jbig2ImageClosure() {
988
990
region .at , decodingContext );
989
991
this .drawBitmap (regionInfo , bitmap );
990
992
},
993
+ onImmediateLosslessGenericRegion :
994
+ function SimpleSegmentVisitor_onImmediateLosslessGenericRegion () {
995
+ this .onImmediateGenericRegion .apply (this , arguments );
996
+ },
991
997
onSymbolDictionary :
992
998
function SimpleSegmentVisitor_onSymbolDictionary (dictionary ,
993
999
currentSegment ,
@@ -1036,6 +1042,10 @@ var Jbig2Image = (function Jbig2ImageClosure() {
1036
1042
region .referenceCorner , region .combinationOperator , huffmanTables ,
1037
1043
region .refinementTemplate , region .refinementAt , decodingContext );
1038
1044
this .drawBitmap (regionInfo , bitmap );
1045
+ },
1046
+ onImmediateLosslessTextRegion :
1047
+ function SimpleSegmentVisitor_onImmediateLosslessTextRegion () {
1048
+ this .onImmediateTextRegion .apply (this , arguments );
1039
1049
}
1040
1050
};
1041
1051
0 commit comments