cz.muni.pdfjbim
Class PdfImage

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

public class PdfImage
extends Object

class representing JBIG2 image in format suitable for pdf (without header,...)

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

Constructor Summary
PdfImage(File imageDataFile)
          constructor sets pointer to file containing image data, pdfImageInformation will be set later
PdfImage(File imageData, PdfImageInformation pdfImageInformation)
          constructor which sets both atributes (image data and informations about this image)
 
Method Summary
 byte[] getImageData()
          return byte array of image data
 File getImageDataFile()
           
 PdfImageInformation getPdfImageInformation()
           
 void setPdfImageInformation(PdfImageInformation pdfImageInformation)
          sets information of pdf image dirrectly
 void setPdfImageInformation(String key, int pageNum, int width, int height, int objNum, int genNum)
          sets information of pdf image by calling constructor
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PdfImage

public PdfImage(File imageDataFile)
constructor sets pointer to file containing image data, pdfImageInformation will be set later

Parameters:
imageDataFile - represents pointer to file containing image data

PdfImage

public PdfImage(File imageData,
                PdfImageInformation pdfImageInformation)
constructor which sets both atributes (image data and informations about this image)

Parameters:
imageData - represents data of image
pdfImageInformation - represents associated information of image like width, height, position in original pdf,...
Method Detail

getImageData

public byte[] getImageData()
                    throws PdfRecompressionException
return byte array of image data

Returns:
byte array with image data
Throws:
PdfRecompressionException - if file wasn't found or there is too much data in the file that cannot be contained in one byte array

setPdfImageInformation

public void setPdfImageInformation(String key,
                                   int pageNum,
                                   int width,
                                   int height,
                                   int objNum,
                                   int genNum)
sets information of pdf image by calling constructor

Parameters:
key - represents pdf object key
pageNum - represents number of page in PDF where is this image belong to
width - represents with of image
height - represents height of image
objNum -
genNum -

setPdfImageInformation

public void setPdfImageInformation(PdfImageInformation pdfImageInformation)
sets information of pdf image dirrectly

Parameters:
pdfImageInformation - represents information about image

getPdfImageInformation

public PdfImageInformation getPdfImageInformation()
Returns:
informations about image

getImageDataFile

public File getImageDataFile()
Returns:
file containing image data

toString

public String toString()
Overrides:
toString in class Object


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