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

void PoDoFo::PdfImage::SetImageDataRaw ( unsigned int  nWidth,
unsigned int  nHeight,
unsigned int  nBitsPerComponent,
PdfInputStream pStream 
) [private]

Set the actual image data from an input stream. The data has to be encoded already and an appropriate filters key entry has to be set manually before!

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

Definition at line 177 of file PdfImage.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfElement::GetObject(), PoDoFo::PdfObject::GetStream(), PoDoFo::PdfRect::SetHeight(), PoDoFo::PdfStream::SetRawData(), 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()->SetRawData( pStream, -1 );

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index