Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 383567 | Differences between
and this patch

Collapse All | Expand All

(-)a/plugins/bmp/xp/ie_impGraphic_BMP.cpp (-4 / +7 lines)
Lines 191-197 UT_Error IE_ImpGraphic_BMP::_convertGraphic(UT_ByteBuf * pBB) Link Here
191
191
192
	/* Clean Up Memory Used */
192
	/* Clean Up Memory Used */
193
		
193
		
194
	FREEP(m_pPNGInfo->palette);
194
	png_colorp palette = 0;
195
	int numClrs = 0;
196
	png_get_PLTE(m_pPNG, m_pPNGInfo, &palette, &numClrs);
197
	FREEP(palette);
195
	DELETEP(pBB);
198
	DELETEP(pBB);
196
	png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
199
	png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
197
   
200
   
Lines 313-319 UT_Error IE_ImpGraphic_BMP::Initialize_PNG() Link Here
313
	 * the normal method of doing things with libpng).  REQUIRED unless you
316
	 * the normal method of doing things with libpng).  REQUIRED unless you
314
	 * set up your own error handlers in the png_create_read_struct() earlier.
317
	 * set up your own error handlers in the png_create_read_struct() earlier.
315
	 */
318
	 */
316
	if (setjmp(m_pPNG->jmpbuf))
319
	if (setjmp(png_jmpbuf(m_pPNG)))
317
	{
320
	{
318
		/* Free all of the memory associated with the png_ptr and info_ptr */
321
		/* Free all of the memory associated with the png_ptr and info_ptr */
319
		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
322
		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
Lines 332-338 UT_Error IE_ImpGraphic_BMP::Initialize_PNG() Link Here
332
	UT_Error IE_ImpGraphic_BMP::Convert_BMP_Pallet(UT_ByteBuf* pBB)
335
	UT_Error IE_ImpGraphic_BMP::Convert_BMP_Pallet(UT_ByteBuf* pBB)
333
	{
336
	{
334
		/* Reset error handling for libpng */
337
		/* Reset error handling for libpng */
335
		if (setjmp(m_pPNG->jmpbuf))
338
		if (setjmp(png_jmpbuf(m_pPNG)))
336
		{
339
		{
337
			png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
340
			png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
338
			return UT_ERROR;
341
			return UT_ERROR;
Lines 372-378 UT_Error IE_ImpGraphic_BMP::Initialize_PNG() Link Here
372
UT_Error IE_ImpGraphic_BMP::Convert_BMP(UT_ByteBuf* pBB)
375
UT_Error IE_ImpGraphic_BMP::Convert_BMP(UT_ByteBuf* pBB)
373
{
376
{
374
	/* Reset error handling for libpng */
377
	/* Reset error handling for libpng */
375
	if (setjmp(m_pPNG->jmpbuf))
378
	if (setjmp(png_jmpbuf(m_pPNG)))
376
	{
379
	{
377
		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
380
		png_destroy_write_struct(&m_pPNG, &m_pPNGInfo);
378
		return UT_ERROR;
381
		return UT_ERROR;
(-)a/plugins/garble/xp/abiword-garble-png.cpp (-1 / +1 lines)
Lines 79-85 bool abiword_document::garble_png( void*& data, size_t& size ) { Link Here
79
		png_set_strip_alpha( png_ptr );
79
		png_set_strip_alpha( png_ptr );
80
		png_set_interlace_handling( png_ptr );
80
		png_set_interlace_handling( png_ptr );
81
		png_set_bgr( png_ptr );
81
		png_set_bgr( png_ptr );
82
		rowbytes = info_ptr->rowbytes;
82
		rowbytes = png_get_rowbytes( png_ptr, info_ptr );
83
		png_destroy_read_struct( &png_ptr, &info_ptr, NULL );
83
		png_destroy_read_struct( &png_ptr, &info_ptr, NULL );
84
	}
84
	}
85
85

Return to bug 383567