I try to extract multiple pages of TIFF documents and "old-style JPEG-in-TIFF" documents using JAI I am here.
With the code below, I am able to extract more than one page TIFF document into single images, but this old style does not work on JPEG documents.
Public Zero Extraction Multipoint () IOException throws {filePath = (string) getSessionObject ("fileName"); If (filePath! = Null & amp;! FilePath.equals ("")) {file = new file (filePath); SeekableStream SS = New FileSeekableStream (file); ImageDecoder dec = ImageCodec.createImageDecoder ("Tiff", SS, blank); Int count = dec.getNumPages (); TIFFEncodeParam Ultimate = New TIFFEncodeParam (); Param.setcompression (TIFFEncodeParam.COMPRESSION_GROUP4); Param.setLittleEndian (wrong); System.out.println ("This is TIF" + Count + "Images"); For (int i = 0; i
Please use the code 'thank you' to make code changes to remove several pages of both 'TIFF' and 'Old Style JPEG' documents.
Comments
Post a Comment