diff --git a/src/jbig2.js b/src/jbig2.js index 239b9fefb..4746a6bb6 100644 --- a/src/jbig2.js +++ b/src/jbig2.js @@ -795,6 +795,7 @@ var Jbig2Image = (function Jbig2ImageClosure() { data, position, end]; break; case 6: // ImmediateTextRegion + case 7: // ImmediateLosslessTextRegion var textRegion = {}; textRegion.info = readRegionSegmentInformation(data, position); position += RegionSegmentInformationFieldLength; @@ -841,13 +842,14 @@ var Jbig2Image = (function Jbig2ImageClosure() { args = [textRegion, header.referredTo, data, position, end]; break; case 38: // ImmediateGenericRegion + case 39: // ImmediateLosslessGenericRegion var genericRegion = {}; genericRegion.info = readRegionSegmentInformation(data, position); position += RegionSegmentInformationFieldLength; var genericRegionSegmentFlags = data[position++]; genericRegion.mmr = !!(genericRegionSegmentFlags & 1); genericRegion.template = (genericRegionSegmentFlags >> 1) & 3; - genericRegion.prediction = !!(genericRegionSegmentFlags & 4); + genericRegion.prediction = !!(genericRegionSegmentFlags & 8); if (!genericRegion.mmr) { var atLength = genericRegion.template == 0 ? 4 : 1; var at = []; @@ -988,6 +990,10 @@ var Jbig2Image = (function Jbig2ImageClosure() { region.at, decodingContext); this.drawBitmap(regionInfo, bitmap); }, + onImmediateLosslessGenericRegion: + function SimpleSegmentVisitor_onImmediateLosslessGenericRegion() { + this.onImmediateGenericRegion.apply(this, arguments); + }, onSymbolDictionary: function SimpleSegmentVisitor_onSymbolDictionary(dictionary, currentSegment, @@ -1036,6 +1042,10 @@ var Jbig2Image = (function Jbig2ImageClosure() { region.referenceCorner, region.combinationOperator, huffmanTables, region.refinementTemplate, region.refinementAt, decodingContext); this.drawBitmap(regionInfo, bitmap); + }, + onImmediateLosslessTextRegion: + function SimpleSegmentVisitor_onImmediateLosslessTextRegion() { + this.onImmediateTextRegion.apply(this, arguments); } };