ICEpdf
  1. ICEpdf
  2. PDF-822

getPageImage() produces images with poorer quality in comparison to earlier version

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 5.1
    • Fix Version/s: 6.0
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      Windows 7 x64, Java 7u21

      Description

      I extract page images using this code:
      for (int index = 0, size = doc.getNumberOfPages(); index < size; index++) {
          for(float zoom: new float[]{1f, 1.5f, 2f}) {
              IDocumentPage page = new DocumentPage();
              BufferedImage image = (BufferedImage) doc.getPageImage(index,
                      GraphicsRenderingHints.SCREEN, Page.BOUNDARY_CROPBOX, 0f, zoom);
              try {
                  ByteArrayOutputStream bos = new ByteArrayOutputStream();
                  ImageIO.write(image, "png", bos);
                  page.setNumber(index);
                  page.setZoom(zoom);
                  page.setByteData(bos.toByteArray());
              } catch (IOException e) {
                  throw new IllegalArgumentException("Can't divided document to pictures", e);
              }
              saveImage(page);
          }
      }

      After migrating to IcePDF 5.1.0 image quality became poorer. See attached example and source pdf. Changing properties described here http://www.icesoft.org/wiki/display/PDF/System+Properties doesn't help at all.
      1. example.pdf
        111 kB
        Yury Shulhat
      1. example.png
        133 kB

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved: