ICEpdf
  1. ICEpdf
  2. PDF-562

org.icepdf.core.ccittfax.jai system property not taking effect

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.1
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      any
    • Salesforce Case Reference:

      Description

      There is a regression in ImageStream where the system property org.icepdf.core.ccittfax.jai=true is not correctly being applied.

      The basic issue is as follows:

      try {
          // corner case where a user may want to use JAI because of
          // speed or compatibility requirements.
          if (forceJaiccittfax) {
              throw new Throwable("Forcing CCITTFAX decode via JAI");
          }
          data = ccittFaxDecode(data, width, height);
          dataLength = data.length;
      } catch (Throwable e) {
          // on a failure then fall back to JAI for a try. likely
          // will not happen.
          if (Tagger.tagging) {
              Tagger.tagImage("CCITTFaxDecode JAI");
          }
          decodedImage = CCITTFax.attemptDeriveBufferedImageFromBytes(
                  this, library, entries, fill);
      }

      If the system property is true then we throw an exception and make the CCITTFax.attemptDeriveBufferedImageFromBytes() call but we never return the decodedImage an hens the problem.

        Activity

        Hide
        Patrick Corless added a comment -

        Updated the ImageStream to correctly return the decoded jai image.

        Show
        Patrick Corless added a comment - Updated the ImageStream to correctly return the decoded jai image.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: