Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1233

CCITTFaxG31DDecodeInputStream - Extended codes have wrong length

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • None
    • None

    Description

      When dealing with large fax images there are Extended Make Up Codes.
      They are added to the tree as ...

      buildUpMakeUp(LONG_MAKE_UP, WHITE_LOOKUP_TREE_ROOT);
      buildUpMakeUp(LONG_MAKE_UP, BLACK_LOOKUP_TREE_ROOT);

      Accept, the length is 0 based not starting at 1792.

      The quick hack is to create a new method so the length of the node is correct

      private static void buildUpMakeUpLong(short[] codes,
      NonLeafLookupTreeNode root)
      {
      for (int len = 0, c = codes.length; len < c; len++)

      { LookupTreeNode leaf = new MakeUpTreeNode((len + 28) * 64); addLookupTreeNode(codes[len], root, leaf); }

      }

      as thus ...

      buildUpMakeUpLong(LONG_MAKE_UP, WHITE_LOOKUP_TREE_ROOT);
      buildUpMakeUpLong(LONG_MAKE_UP, BLACK_LOOKUP_TREE_ROOT);

      Attachments

        Activity

          People

            lehmi Andreas Lehmkühler
            dave.smith Dave Smith
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: