Examples of PageInformationSegment


Examples of org.jpedal.jbig2.segment.pageinformation.PageInformationSegment

    JBIG2Bitmap bitmap = new JBIG2Bitmap(regionBitmapWidth, regionBitmapHeight, arithmeticDecoder, huffmanDecoder, mmrDecoder);

    bitmap.readTextRegion(sbHuffman, symbolRefine, noOfSymbolInstances, logStrips, noOfSymbols, symbolCodeTable, symbolCodeLength, symbols, defaultPixel, combinationOperator, transposed, referenceCorner, sOffset, huffmanFSTable, huffmanDSTable, huffmanDTTable, huffmanRDWTable, huffmanRDHTable, huffmanRDXTable, huffmanRDYTable, huffmanRSizeTable, template, symbolRegionAdaptiveTemplateX, symbolRegionAdaptiveTemplateY, decoder);

    if (inlineImage) {
      PageInformationSegment pageSegment = decoder.findPageSegement(segmentHeader.getPageAssociation());
      JBIG2Bitmap pageBitmap = pageSegment.getPageBitmap();

      if (JBIG2StreamDecoder.debug)
        System.out.println(pageBitmap + " " + bitmap);

      int externalCombinationOperator = regionFlags.getFlagValue(RegionFlags.EXTERNAL_COMBINATION_OPERATOR);
View Full Code Here

Examples of org.jpedal.jbig2.segment.pageinformation.PageInformationSegment

      genericRegionAdaptiveTemplateX[1] = readATValue();
      genericRegionAdaptiveTemplateY[1] = readATValue();
    }

    if (noOfReferedToSegments == 0 || inlineImage) {
      PageInformationSegment pageSegment = decoder.findPageSegement(segmentHeader.getPageAssociation());
      JBIG2Bitmap pageBitmap = pageSegment.getPageBitmap();

      if (pageSegment.getPageBitmapHeight() == -1 && regionBitmapYLocation + regionBitmapHeight > pageBitmap.getHeight()) {
        pageBitmap.expand(regionBitmapYLocation + regionBitmapHeight, pageSegment.getPageInformationFlags().getFlagValue(PageInformationFlags.DEFAULT_PIXEL_VALUE));
      }
    }

    if (noOfReferedToSegments > 1) {
      if(JBIG2StreamDecoder.debug)
        System.out.println("Bad reference in JBIG2 generic refinement Segment");
     
      return;
    }

    JBIG2Bitmap referedToBitmap;
    if (noOfReferedToSegments == 1) {
      referedToBitmap = decoder.findBitmap(referedToSegments[0]);
    } else {
      PageInformationSegment pageSegment = decoder.findPageSegement(segmentHeader.getPageAssociation());
      JBIG2Bitmap pageBitmap = pageSegment.getPageBitmap();

      referedToBitmap = pageBitmap.getSlice(regionBitmapXLocation, regionBitmapYLocation, regionBitmapWidth, regionBitmapHeight);
    }

    arithmeticDecoder.resetRefinementStats(template, null);
    arithmeticDecoder.start();

    boolean typicalPredictionGenericRefinementOn = refinementRegionFlags.getFlagValue(RefinementRegionFlags.TPGDON) != 0;

    JBIG2Bitmap bitmap = new JBIG2Bitmap(regionBitmapWidth, regionBitmapHeight, arithmeticDecoder, huffmanDecoder, mmrDecoder);

    bitmap.readGenericRefinementRegion(template, typicalPredictionGenericRefinementOn, referedToBitmap, 0, 0, genericRegionAdaptiveTemplateX, genericRegionAdaptiveTemplateY);

    if (inlineImage) {
      PageInformationSegment pageSegment = decoder.findPageSegement(segmentHeader.getPageAssociation());
      JBIG2Bitmap pageBitmap = pageSegment.getPageBitmap();

      int extCombOp = regionFlags.getFlagValue(RegionFlags.EXTERNAL_COMBINATION_OPERATOR);

      pageBitmap.combine(bitmap, regionBitmapXLocation, regionBitmapYLocation, extCombOp);
    } else {
View Full Code Here

Examples of org.jpedal.jbig2.segment.pageinformation.PageInformationSegment

        bitmap.readBitmap(useMMR, template, typicalPredictionGenericDecodingOn, false, null, genericBAdaptiveTemplateX, genericBAdaptiveTemplateY, useMMR ? 0 : length - 18);
       
       
       
        if (inlineImage) {
            PageInformationSegment pageSegment = decoder.findPageSegement(segmentHeader.getPageAssociation());
            JBIG2Bitmap pageBitmap = pageSegment.getPageBitmap();

            int extCombOp = regionFlags.getFlagValue(RegionFlags.EXTERNAL_COMBINATION_OPERATOR);
           
            if(pageSegment.getPageBitmapHeight() == -1 && regionBitmapYLocation + regionBitmapHeight > pageBitmap.getHeight()) {
              pageBitmap.expand(regionBitmapYLocation + regionBitmapHeight,
                  pageSegment.getPageInformationFlags().getFlagValue(PageInformationFlags.DEFAULT_PIXEL_VALUE));
            }
           
            pageBitmap.combine(bitmap, regionBitmapXLocation, regionBitmapYLocation, extCombOp);
        } else {
      bitmap.setBitmapNumber(getSegmentHeader().getSegmentNumber());
View Full Code Here

Examples of org.jpedal.jbig2.segment.pageinformation.PageInformationSegment

      case Segment.PAGE_INFORMATION:
        if (JBIG2StreamDecoder.debug)
          System.out.println("==== Page Information Dictionary ====");

        segment = new PageInformationSegment(this);

        segment.setSegmentHeader(segmentHeader);

        break;
View Full Code Here

Examples of org.jpedal.jbig2.segment.pageinformation.PageInformationSegment

        i++;
      }
    }

    if (inlineImage) {
      PageInformationSegment pageSegment = decoder.findPageSegement(segmentHeader.getPageAssociation());
      JBIG2Bitmap pageBitmap = pageSegment.getPageBitmap();

      int externalCombinationOperator = regionFlags.getFlagValue(RegionFlags.EXTERNAL_COMBINATION_OPERATOR);
      pageBitmap.combine(bitmap, regionBitmapXLocation, regionBitmapYLocation, externalCombinationOperator);
    } else {
      bitmap.setBitmapNumber(getSegmentHeader().getSegmentNumber());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.