Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

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

nWidthwidth of the image in pixels
nHeightheight of the image in pixels
nBitsPerComponentbits per color component of the image (depends on the image colorspace you have set but is 8 in most cases)
pStreamstream supplieding raw image data
vecFiltersthese filters will be applied to compress the image data

Definition at line 159 of file PdfImage.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfElement::GetObject(), PoDoFo::PdfObject::GetStream(), PoDoFo::PdfStream::Set(), PoDoFo::PdfRect::SetHeight(), PoDoFo::PdfRect::SetWidth(), and PoDoFo::PdfRect::ToVariant().

    m_rRect.SetWidth( nWidth );
    m_rRect.SetHeight( nHeight );

    this->GetObject()->GetDictionary().AddKey( "Width",  PdfVariant( static_cast<pdf_int64>(nWidth) ) );
    this->GetObject()->GetDictionary().AddKey( "Height", PdfVariant( static_cast<pdf_int64>(nHeight) ) );
    this->GetObject()->GetDictionary().AddKey( "BitsPerComponent", PdfVariant( static_cast<pdf_int64>(nBitsPerComponent) ) );

    PdfVariant var;
    m_rRect.ToVariant( var );
    this->GetObject()->GetDictionary().AddKey( "BBox", var );

    this->GetObject()->GetStream()->Set( pStream, vecFilters );

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index