PoDoFo::PdfImage Class Reference

#include <PdfImage.h>

Inheritance diagram for PoDoFo::PdfImage:

PoDoFo::PdfXObject PoDoFo::PdfElement PoDoFo::PdfCanvas

List of all members.

Public Member Functions

 PdfImage (PdfVecObjects *pParent)
 PdfImage (PdfDocument *pParent)
 PdfImage (PdfObject *pObject)
void SetImageColorSpace (EPdfColorSpace eColorSpace)
void SetImageICCProfile (PdfInputStream *pStream, long lColorComponents, EPdfColorSpace eAlternateColorSpace=ePdfColorSpace_DeviceRGB)
double GetWidth () const
double GetHeight () const
void SetImageData (unsigned int nWidth, unsigned int nHeight, unsigned int nBitsPerComponent, PdfInputStream *pStream)
void SetImageData (unsigned int nWidth, unsigned int nHeight, unsigned int nBitsPerComponent, PdfInputStream *pStream, const TVecFilters &vecFilters)
void LoadFromFile (const char *pszFilename)


Detailed Description

A PdfImage object is needed when ever you want to embedd an image file into a PDF document. The PdfImage object is embedded once and can be drawn as often as you want on any page in the document using a PdfImageRef object which has to be retrieved from the PdfImage object before drawing.

See also:
GetImageReference

PdfPainter::DrawImage

SetImageData


Constructor & Destructor Documentation

PoDoFo::PdfImage::PdfImage ( PdfVecObjects pParent  ) 

Constuct a new PdfImage object

Parameters:
pParent parent vector of this image

PoDoFo::PdfImage::PdfImage ( PdfDocument pParent  ) 

Constuct a new PdfImage object This is an overloaded constructor.

Parameters:
pParent parent document

PoDoFo::PdfImage::PdfImage ( PdfObject pObject  ) 

Construct an image from an existing PdfObject

Parameters:
pObject a PdfObject that has to be an image


Member Function Documentation

double PoDoFo::PdfImage::GetHeight (  )  const [inline]

Get the height of the image when drawn in PDF units

Returns:
the height in PDF units

double PoDoFo::PdfImage::GetWidth (  )  const [inline]

Get the width of the image when drawn in PDF units

Returns:
the width in PDF units

void PoDoFo::PdfImage::LoadFromFile ( const char *  pszFilename  ) 

Load the image data from a file

Parameters:
pszFilename 

void PoDoFo::PdfImage::SetImageColorSpace ( EPdfColorSpace  eColorSpace  ) 

Set the color space of this image. The default value is ePdfColorSpace_DeviceRGB.

Parameters:
eColorSpace one of ePdfColorSpace_DeviceGray, ePdfColorSpace_DeviceRGB and ePdfColorSpace_DeviceCMYK
See also:
SetImageICCProfile to set an ICC profile instead of a simple colorspace

void PoDoFo::PdfImage::SetImageData ( unsigned int  nWidth,
unsigned int  nHeight,
unsigned int  nBitsPerComponent,
PdfInputStream pStream,
const TVecFilters &  vecFilters 
)

Set the actual image data from an input stream

Parameters:
nWidth width of the image in pixels
nHeight height of the image in pixels
nBitsPerComponent bits per color component of the image (depends on the image colorspace you have set but is 8 in most cases)
pStream stream supplieding raw image data
vecFilters these filters will be applied to compress the image data

void PoDoFo::PdfImage::SetImageData ( unsigned int  nWidth,
unsigned int  nHeight,
unsigned int  nBitsPerComponent,
PdfInputStream pStream 
)

Set the actual image data from an input stream

The image data will be flater compressed. If you want no compression or another filter to be applied use the overload of SetImageData which takes a TVecFilters as argument.

Parameters:
nWidth width of the image in pixels
nHeight height of the image in pixels
nBitsPerComponent bits per color component of the image (depends on the image colorspace you have set but is 8 in most cases)
pStream stream supplieding raw image data
See also:
SetImageData

void PoDoFo::PdfImage::SetImageICCProfile ( PdfInputStream pStream,
long  lColorComponents,
EPdfColorSpace  eAlternateColorSpace = ePdfColorSpace_DeviceRGB 
)

Set an ICC profile for this image.

Parameters:
pStream an input stream from which the ICC profiles data can be read
lColorComponents the number of colorcomponents of the ICC profile
eAlternateColorSpace an alternate colorspace to use if the ICC profile cannot be used
See also:
SetImageColorSpace to set an colorspace instead of an ICC profile for this image


Generated on Tue Jul 28 00:01:34 2009 for PoDoFo by  doxygen 1.5.9