Hi there,
I‘ve got a PDF file with a flate encoded 16-Bit-CMYK-image using a predictor
of type 2. This is not supported by podofo at the moment.
I made some changes to the predictor code to support this feature.
The code is far from perfect - more kind of a hack - but it does what is
expected. Perhaps someone could integrate it more elegant and save in podofo
the code.
Thanks and good luck.
Christian
PdfFiltersPrivate.cpp
starting at line 144
switch( m_nCurPredictor )
{
case 2: // Tiff Predictor
{
if(m_nBPC == 8)
{ // Same as png sub
int prev = (m_nCurRowIndex - m_nBpp < 0
? 0 : m_pPrev[m_nCurRowIndex - m_nBpp]);
m_pPrev[m_nCurRowIndex] = *pBuffer + prev;
break;
}
---->Insertion:
else if(m_nBPC == 16)
{ short *l_pPrev =
reinterpret_cast<short*>(m_pPrev);
const short *lpBuffer = reinterpret_cast<const
short*>(pBuffer);
int prev = (m_nCurRowIndex - m_nBpp < 0
? 0 : l_pPrev[m_nCurRowIndex - m_nBpp]);
l_pPrev[m_nCurRowIndex/2] = *lpBuffer + prev;
--lLen;
++pBuffer;
++m_nCurRowIndex;
break;
}
// TODO: implement tiff predictor for other than 8 BPC
PODOFO_RAISE_ERROR( ePdfError_InvalidPredictor );
break;
}
case 10: // png none
Gesendet von Windows Mail
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Podofo-users mailing list
Podofo-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/podofo-users