Examples of JBIG2Decoder


Examples of org.jpedal.jbig2.JBIG2Decoder

    return ByteBuffer.wrap(decode(dict, bytes));
  }


  protected static byte[] decode(PDFObject dict, byte[] source) throws IOException {
    JBIG2Decoder decoder;
    decoder = new JBIG2Decoder();
    try {
      byte[] globals = getOptionFieldBytes(dict, "JBIG2Globals");
      if (globals != null) {
        decoder.setGlobalData(globals);
      }
      decoder.decodeJBIG2(source);
    } catch (JBIG2Exception ex) {
      IOException ioException;

      ioException = new IOException();
      ioException.initCause(ex);
      throw ioException;
    }
    return decoder.getPageAsJBIG2Bitmap(0).getData(true);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.