#include <PdfImage.h>
Public Member Functions | |
PdfImage (PdfVecObjects *pParent, const char *pszPrefix=NULL) | |
PdfImage (PdfDocument *pParent, const char *pszPrefix=NULL) | |
PdfImage (PdfObject *pObject) | |
void | SetImageColorSpace (EPdfColorSpace eColorSpace) |
void | SetImageICCProfile (PdfInputStream *pStream, long lColorComponents, EPdfColorSpace eAlternateColorSpace=ePdfColorSpace_DeviceRGB) |
void | SetImageSoftmask (const PdfImage *pSoftmask) |
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) |
Static Public Member Functions | |
static const char ** | GetSupportedFormats () |
PoDoFo::PdfImage::PdfImage | ( | PdfVecObjects * | pParent, | |
const char * | pszPrefix = NULL | |||
) |
Constuct a new PdfImage object
pParent | parent vector of this image | |
pszPrefix | optional prefix for XObject-name |
PoDoFo::PdfImage::PdfImage | ( | PdfDocument * | pParent, | |
const char * | pszPrefix = NULL | |||
) |
Constuct a new PdfImage object This is an overloaded constructor.
pParent | parent document | |
pszPrefix | optional prefix for XObject-name |
PoDoFo::PdfImage::PdfImage | ( | PdfObject * | pObject | ) |
double PoDoFo::PdfImage::GetHeight | ( | ) | const [inline] |
Get the height of the image when drawn in PDF units
const char ** PoDoFo::PdfImage::GetSupportedFormats | ( | ) | [static] |
Get a list of all image formats supported by this PoDoFo build.
Example: { "JPEG", "TIFF", NULL }
double PoDoFo::PdfImage::GetWidth | ( | ) | const [inline] |
Get the width of the image when drawn in PDF units
void PoDoFo::PdfImage::LoadFromFile | ( | const char * | pszFilename | ) |
Load the image data from a file
pszFilename |
void PoDoFo::PdfImage::SetImageColorSpace | ( | EPdfColorSpace | eColorSpace | ) |
Set the color space of this image. The default value is ePdfColorSpace_DeviceRGB.
eColorSpace | one of ePdfColorSpace_DeviceGray, ePdfColorSpace_DeviceRGB and ePdfColorSpace_DeviceCMYK |
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
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 flate compressed. If you want no compression or another filter to be applied use the overload of SetImageData which takes a TVecFilters as argument.
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 |
void PoDoFo::PdfImage::SetImageICCProfile | ( | PdfInputStream * | pStream, | |
long | lColorComponents, | |||
EPdfColorSpace | eAlternateColorSpace = ePdfColorSpace_DeviceRGB | |||
) |
Set an ICC profile for this image.
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 |
void PoDoFo::PdfImage::SetImageSoftmask | ( | const PdfImage * | pSoftmask | ) |
Set a softmask for this image.
pSoftmask | a PdfImage pointer to the image, which is to be set as softmask, must be 8-Bit-Grayscale |