private void composePageJPG(File outputFile) throws Exception {
  File fileMemoryBlockJPG=null;
  BufferedImage imageBlocks=new BufferedImage(memoryWidth,memoryHeight,BufferedImage.TYPE_INT_RGB);
  Graphics graphics=imageBlocks.getGraphics();
  BufferedImage image=null;
  for (int i=memoryBlockProcessed; i < memoryBlockTotal; i++) {
    fileMemoryBlockJPG=new File(path,prefix + "-block" + i+ ".jpg");
    image=ImageIO.read(fileMemoryBlockJPG);
    graphics.drawImage(ImageIO.read(fileMemoryBlockJPG),0,memoryRow,null);
    fileMemoryBlockJPG.delete();
    memoryRow+=image.getHeight();
  }
  imageBlocks.flush();
  graphics.dispose();
  numPage++;
  ImageIO.write(imageBlocks,"png",outputFile);
  addTempFile(outputFile);
  addScanFile(outputFile);
}

private void composePageJPG ( File outputFile ) throws Exception { File fileMemoryBlockJPG = null ; BufferedImage imageBlocks = new BufferedImage ( memoryWidth , memoryHeight , BufferedImage . TYPE_INT_RGB ) ; Graphics graphics = imageBlocks . getGraphics ( ) ; BufferedImage image = null ; for ( int i = memoryBlockProcessed ; i < memoryBlockTotal ; i ++ ) { fileMemoryBlockJPG = new File ( path , prefix + "-block" + i + ".jpg" ) ; image = ImageIO . read ( fileMemoryBlockJPG ) ; graphics . drawImage ( ImageIO . read ( fileMemoryBlockJPG ) , 0 , memoryRow , null ) ; fileMemoryBlockJPG . delete ( ) ; memoryRow += image . getHeight ( ) ; } imageBlocks . flush ( ) ; graphics . dispose ( ) ; numPage ++ ; ImageIO . write ( imageBlocks , "png" , outputFile ) ; addTempFile ( outputFile ) ; addScanFile ( outputFile ) ; }
permite componer los diversos jpg correspondientes a cada bloque de memoria y genera un png para la pagina completa
