cz.muni.pdfjbim
Class Jbig2ForPdf

java.lang.Object
  extended by cz.muni.pdfjbim.Jbig2ForPdf

public class Jbig2ForPdf
extends Object

class representing list of images compressed according to JBIG2 standard in format suitable for pdf and byte array of global Data

Author:
Radim Hatlapatka (hata.radim@gmail.com)

Constructor Summary
Jbig2ForPdf(String pathToDir, String basename)
          constructor that reads jbig2 images and global data and saves them in array of bytes
 
Method Summary
 void addJbig2Image(int key, PdfImage jbImage)
          add pdf image
 byte[] getGlobalData()
           
 List<File> getJbFiles()
           
 PdfImage getJbig2Image(int index)
           
 Map<PdfObjId,PdfImage> getMapOfJbig2Images()
           
 SortedMap<Integer,PdfImage> getSortedMapOfJbig2Images()
           
 void setGlobalData(byte[] globalData)
          sets global data of image
 void setJbig2ImageInfo(int i, PdfImageInformation pdfImageInformation)
          sets information to concrete image in the list
 void setJbig2Images(SortedMap<Integer,PdfImage> jbig2Images)
          sets atribut jbig2Images
 void setJbig2ImagesInfo(List<PdfImageInformation> pdfImageInformations)
          Sets informations about pdf image given in List.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jbig2ForPdf

public Jbig2ForPdf(String pathToDir,
                   String basename)
            throws PdfRecompressionException
constructor that reads jbig2 images and global data and saves them in array of bytes

Parameters:
pathToDir - represents path to directory containing images data and global data
basename -
Throws:
PdfRecompressionException
Method Detail

addJbig2Image

public void addJbig2Image(int key,
                          PdfImage jbImage)
add pdf image

Parameters:
key -
jbImage - represents image encoding according to JBIG2 standard

setJbig2ImageInfo

public void setJbig2ImageInfo(int i,
                              PdfImageInformation pdfImageInformation)
sets information to concrete image in the list

Parameters:
i - represents position of the image in the list
pdfImageInformation - represents information about that image

setJbig2ImagesInfo

public void setJbig2ImagesInfo(List<PdfImageInformation> pdfImageInformations)
                        throws PdfRecompressionException
Sets informations about pdf image given in List. This list of information has to have the same order as images in the list of pdf images and the same count

Parameters:
pdfImageInformations - represents list of informations about pdf images
Throws:
PdfRecompressionException

setGlobalData

public void setGlobalData(byte[] globalData)
sets global data of image

Parameters:
globalData - represents global data

setJbig2Images

public void setJbig2Images(SortedMap<Integer,PdfImage> jbig2Images)
sets atribut jbig2Images

Parameters:
jbig2Images - represents list of pdf images

getGlobalData

public byte[] getGlobalData()
Returns:
return global data

getJbig2Image

public PdfImage getJbig2Image(int index)
Parameters:
index - represents position of image in the list
Returns:
image from the list from position given by parameter index

getSortedMapOfJbig2Images

public SortedMap<Integer,PdfImage> getSortedMapOfJbig2Images()
Returns:
list of pdf images encoded according to JBIG2 standard

getMapOfJbig2Images

public Map<PdfObjId,PdfImage> getMapOfJbig2Images()
Returns:
map of images identified by PDF object ID

getJbFiles

public List<File> getJbFiles()
Returns:
files that contains data of images and global data (output of jbig2enc with parameters -s and -p)


Copyright © 2012 Faculty of Informatics, Masaryk University, Brno. All Rights Reserved.