Lines 191-197
UT_Error IE_ImpGraphic_BMP::_convertGrap
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; |
|
|
195 |
int num_palette; |
196 |
png_get_PLTE( m_pPNG, m_pPNGInfo, &palette, &num_palette ); |
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_P
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_P
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_P
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; |