ICEpdf
  1. ICEpdf
  2. PDF-540

Update multipage capture example with better interpolation algorithm.

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.0 beta1
    • Fix Version/s: 5.0
    • Component/s: Examples
    • Labels:
      None
    • Environment:
      any

      Description

      Update the CCITTFax example to use some very cool interpolation algorithms in JAI to generate a better quality black and white image capture. The image operation is as follow:

        // JAI filter code
              LookupTableJAI lut = new LookupTableJAI(new byte[][]{{(byte) 0x00,
                      (byte) 0xff}, {(byte) 0x00, (byte) 0xff}, {(byte) 0x00, (byte) 0xff}});
              ImageLayout layout = new ImageLayout();
              byte[] map = new byte[]{(byte) 0x00, (byte) 0xff};
              ColorModel cm = new IndexColorModel(1, 2, map, map, map);
              layout.setColorModel(cm);
              SampleModel sm = new MultiPixelPackedSampleModel(DataBuffer.TYPE_BYTE,
                      surrogateImage.getWidth(),
                      surrogateImage.getHeight(),
                      1);
              layout.setSampleModel(sm);
              RenderingHints hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout);
              PlanarImage op = ErrorDiffusionDescriptor.create(surrogateImage, lut,
                      KernelJAI.ERROR_FILTER_FLOYD_STEINBERG, hints);
              BufferedImage dst = op.getAsBufferedImage();

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #34077 Tue Mar 26 14:44:17 MDT 2013 patrick.corless PDF-540 updated the multipage capture example to use CCITT T.4 tiff compression and some JAI trickery to produce a significantly higher quality image capture.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/examples/captureMultiple/MultiPageCapture.java

          People

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

            Dates

            • Created:
              Updated:
              Resolved: