ICEpdf
  1. ICEpdf
  2. PDF-683

Improve DeviceGray image interpolation

    Details

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

      Description

      We have had quite a few requests to improve the render quality of DeviceGray images. This requests usually falls into two different types; fax scans and small images used in type 3 fonts. When this type of document is viewed at the default zoom level the image can be difficult to read and or looks jagged.

      Turning on the following system properties helps a bit but the end result isn't as crisp as adobe.
      -Dorg.icepdf.core.target.dither=VALUE_DITHER_ENABLE
      -Dorg.icepdf.core.screen.render=VALUE_RENDER_QUALITY
      -Dorg.icepdf.core.screen.interpolation=VALUE_INTERPOLATION_BICUBIC
      -Dorg.icepdf.core.imageReference=smoothScaled

      This bug will capture changes to the smoothScaled image reference implementation to help improve image render quality.

        Activity

        Patrick Corless created issue -
        Arran Mccullough made changes -
        Field Original Value New Value
        Salesforce Case Reference 5007000000XQmPZAA1
        Arran Mccullough made changes -
        Salesforce Case Reference 5007000000XQmPZAA1 5007000000XQJamAAH,5007000000XQmPZAA1
        Hide
        Patrick Corless added a comment -

        I've updated to the SmoothScaledImageReference class to scale DeviceGray images using a new recursive trilinear image scaling method tht significantly improves the readability of this type of images. There is a slight blurring at high zoom levels but overall I think this is a step forward.

        Show
        Patrick Corless added a comment - I've updated to the SmoothScaledImageReference class to scale DeviceGray images using a new recursive trilinear image scaling method tht significantly improves the readability of this type of images. There is a slight blurring at high zoom levels but overall I think this is a step forward.
        Hide
        Patrick Corless added a comment -

        Applied enhancement trunk and 5.0.1 branch.

        Show
        Patrick Corless added a comment - Applied enhancement trunk and 5.0.1 branch.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38840 Wed Nov 20 15:46:25 MST 2013 patrick.corless PDF-683 added an enhancement to SmoothScaledImageReference to use a trilinear interpolation method for scaling black and white images.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/graphics/SmoothScaledImageReference.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/ImageStream.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38841 Wed Nov 20 15:46:55 MST 2013 patrick.corless PDF-683 added an enhancement to SmoothScaledImageReference to use a trilinear interpolation method for scaling black and white images.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/ImageStream.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/SmoothScaledImageReference.java
        Hide
        Patrick Corless added a comment -

        Just wanted to state again that image interpolation will be significantly enahnced with the following properties:

        -Dorg.icepdf.core.target.dither=VALUE_DITHER_ENABLE
        -Dorg.icepdf.core.screen.render=VALUE_RENDER_QUALITY
        -Dorg.icepdf.core.screen.interpolation=VALUE_INTERPOLATION_BICUBIC
        -Dorg.icepdf.core.imageReference=smoothScaled

        Show
        Patrick Corless added a comment - Just wanted to state again that image interpolation will be significantly enahnced with the following properties: -Dorg.icepdf.core.target.dither=VALUE_DITHER_ENABLE -Dorg.icepdf.core.screen.render=VALUE_RENDER_QUALITY -Dorg.icepdf.core.screen.interpolation=VALUE_INTERPOLATION_BICUBIC -Dorg.icepdf.core.imageReference=smoothScaled
        Hide
        Patrick Corless added a comment -

        added some more test files to the support drive.

        Show
        Patrick Corless added a comment - added some more test files to the support drive.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #38861 Fri Nov 22 11:25:44 MST 2013 patrick.corless PDF-683 added max width and height values, if an images dimensions are greater then anyone of these the image is returned unaltered, this should help avoid memory issues with really large images.
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/SmoothScaledImageReference.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #39503 Tue Jan 07 15:37:39 MST 2014 patrick.corless PDF-683 second pass at improving device gray image interpolation, to aid in smoothing a scale of .99 is used for all images except for those under 50x50 which are generally type 3 font glyph images which need the extra smoothing
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/graphics/SmoothScaledImageReference.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: