Lines Matching refs:o_rOutputBuf
122 void PngHelper::appendFileHeader( OutputBuffer& o_rOutputBuf ) in appendFileHeader() argument
126 … o_rOutputBuf.insert( o_rOutputBuf.end(), aHeader, aHeader + sizeof(aHeader)/sizeof(aHeader[0]) ); in appendFileHeader()
129 size_t PngHelper::startChunk( const char* pChunkName, OutputBuffer& o_rOutputBuf ) in startChunk() argument
131 size_t nIndex = sal_uInt32( o_rOutputBuf.size() ); in startChunk()
132 o_rOutputBuf.insert( o_rOutputBuf.end(), 4, (Output_t)0 ); in startChunk()
133 o_rOutputBuf.push_back( pChunkName[0] ); in startChunk()
134 o_rOutputBuf.push_back( pChunkName[1] ); in startChunk()
135 o_rOutputBuf.push_back( pChunkName[2] ); in startChunk()
136 o_rOutputBuf.push_back( pChunkName[3] ); in startChunk()
140 void PngHelper::set( sal_uInt32 i_nValue, OutputBuffer& o_rOutputBuf, size_t i_nIndex ) in set() argument
142 o_rOutputBuf[ i_nIndex ] = (i_nValue & 0xff000000) >> 24; in set()
143 o_rOutputBuf[ i_nIndex+1 ] = (i_nValue & 0x00ff0000) >> 16; in set()
144 o_rOutputBuf[ i_nIndex+2 ] = (i_nValue & 0x0000ff00) >> 8; in set()
145 o_rOutputBuf[ i_nIndex+3 ] = (i_nValue & 0x000000ff); in set()
148 void PngHelper::endChunk( size_t nStart, OutputBuffer& o_rOutputBuf ) in endChunk() argument
150 if( nStart+8 > o_rOutputBuf.size() ) in endChunk()
154 size_t nLen = o_rOutputBuf.size() - nStart; in endChunk()
156 set( nDataLen, o_rOutputBuf, nStart ); in endChunk()
159 sal_uInt32 nChunkCRC = getCRC( (sal_uInt8*)&o_rOutputBuf[nStart+4], nLen-4 ); in endChunk()
160 append( nChunkCRC, o_rOutputBuf ); in endChunk()
163 void PngHelper::appendIHDR( OutputBuffer& o_rOutputBuf, int width, int height, int depth, int color… in appendIHDR() argument
165 size_t nStart = startChunk( "IHDR", o_rOutputBuf ); in appendIHDR()
166 append( width, o_rOutputBuf ); in appendIHDR()
167 append( height, o_rOutputBuf ); in appendIHDR()
168 o_rOutputBuf.push_back( Output_t(depth) ); in appendIHDR()
169 o_rOutputBuf.push_back( Output_t(colortype) ); in appendIHDR()
170 o_rOutputBuf.push_back( 0 ); // compression method deflate in appendIHDR()
171 o_rOutputBuf.push_back( 0 ); // filtering method 0 (default) in appendIHDR()
172 o_rOutputBuf.push_back( 0 ); // no interlacing in appendIHDR()
173 endChunk( nStart, o_rOutputBuf ); in appendIHDR()
176 void PngHelper::appendIEND( OutputBuffer& o_rOutputBuf ) in appendIEND() argument
178 size_t nStart = startChunk( "IEND", o_rOutputBuf ); in appendIEND()
179 endChunk( nStart, o_rOutputBuf ); in appendIEND()
182 void PngHelper::createPng( OutputBuffer& o_rOutputBuf, in createPng() argument
191 appendFileHeader( o_rOutputBuf ); in createPng()
192 appendIHDR( o_rOutputBuf, width, height, 1, 3 ); in createPng()
195 size_t nIdx = startChunk( "PLTE", o_rOutputBuf ); in createPng()
197 o_rOutputBuf.push_back(colToByte(zeroColor.r)); in createPng()
198 o_rOutputBuf.push_back(colToByte(zeroColor.g)); in createPng()
199 o_rOutputBuf.push_back(colToByte(zeroColor.b)); in createPng()
200 o_rOutputBuf.push_back(colToByte(oneColor.r)); in createPng()
201 o_rOutputBuf.push_back(colToByte(oneColor.g)); in createPng()
202 o_rOutputBuf.push_back(colToByte(oneColor.b)); in createPng()
204 endChunk( nIdx, o_rOutputBuf ); in createPng()
209 nIdx = startChunk( "tRNS", o_rOutputBuf ); in createPng()
210 o_rOutputBuf.push_back( 0xff ); in createPng()
211 o_rOutputBuf.push_back( 0 ); in createPng()
213 endChunk( nIdx, o_rOutputBuf ); in createPng()
231 nIdx = startChunk( "IDAT", o_rOutputBuf ); in createPng()
233 deflateBuffer( &aScanlines[0], aScanlines.size(), o_rOutputBuf ); in createPng()
235 endChunk( nIdx, o_rOutputBuf ); in createPng()
238 appendIEND( o_rOutputBuf ); in createPng()
241 void PngHelper::createPng( OutputBuffer& o_rOutputBuf, in createPng() argument
247 appendFileHeader( o_rOutputBuf ); in createPng()
248 appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image in createPng()
315 size_t nIdx = startChunk( "IDAT", o_rOutputBuf ); in createPng()
317 deflateBuffer( &aScanlines[0], aScanlines.size(), o_rOutputBuf ); in createPng()
319 endChunk( nIdx, o_rOutputBuf ); in createPng()
321 appendIEND( o_rOutputBuf ); in createPng()
325 void PngHelper::createPng( OutputBuffer& o_rOutputBuf, in createPng() argument
333 appendFileHeader( o_rOutputBuf ); in createPng()
334 appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image in createPng()
399 size_t nIdx = startChunk( "IDAT", o_rOutputBuf ); in createPng()
401 deflateBuffer( &aScanlines[0], aScanlines.size(), o_rOutputBuf ); in createPng()
403 endChunk( nIdx, o_rOutputBuf ); in createPng()
405 appendIEND( o_rOutputBuf ); in createPng()