Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      -
    • Salesforce Case Reference:

      Description

      The attached pdf's clarity is not as good as Adobe. The pdf is poor quality to being with. We've tried setting -Dorg.icepdf.core.imageReference=scaled along with 'mipmap' but see no improvement. Patrick suspects that we may need to write a custom ImageReference implementation for this type of file.

        Activity

        Hide
        Patrick Corless added a comment -

        Closing, the images should look better when mipmap scaling is used, awaiting feedback from the client when 5.0.3 is released.

        Show
        Patrick Corless added a comment - Closing, the images should look better when mipmap scaling is used, awaiting feedback from the client when 5.0.3 is released.
        Hide
        Patrick Corless added a comment -

        I've revisited the MIP maps implementation and changed the scaling to incremental scale the same image as suggested above. This combine with fixes to the the image proxy should improve the overall image quality of such pdfs.

        Show
        Patrick Corless added a comment - I've revisited the MIP maps implementation and changed the scaling to incremental scale the same image as suggested above. This combine with fixes to the the image proxy should improve the overall image quality of such pdfs.
        Hide
        Patrick Corless added a comment -

        Thanks for checking back in Pepijn, I'll revisit the patch. Thanks for you feedback.

        Show
        Patrick Corless added a comment - Thanks for checking back in Pepijn, I'll revisit the patch. Thanks for you feedback.
        Hide
        Pepijn Van Eeckhoudt added a comment - - edited

        MipMappedImageReference was (I assume) ported from a patch I submitted some time ago to improve image scaling quality. Unfortunately, the ported version does not implement the scaling in a way that actually improves quality. The javadoc even states (incorrectly) that

        The main idea here is that small images are painted at smaller zoom levels which in theory speeds up the image paint time.

        This was in fact not the main purpose. The main purpose was improved rendering quality of downscaled images. The original version derived each lower-res mipmap level from the previous level, scaling by a factor of two each time. The ported version always scales directly from the initial source image. This is potentially slower and defintely results in poorer image quality due to how Java2D implements image scaling.
        See https://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html for details.

        Show
        Pepijn Van Eeckhoudt added a comment - - edited MipMappedImageReference was (I assume) ported from a patch I submitted some time ago to improve image scaling quality. Unfortunately, the ported version does not implement the scaling in a way that actually improves quality. The javadoc even states (incorrectly) that The main idea here is that small images are painted at smaller zoom levels which in theory speeds up the image paint time. This was in fact not the main purpose. The main purpose was improved rendering quality of downscaled images. The original version derived each lower-res mipmap level from the previous level, scaling by a factor of two each time. The ported version always scales directly from the initial source image. This is potentially slower and defintely results in poorer image quality due to how Java2D implements image scaling. See https://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html for details.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Tyler Johnson
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: