List Info

Thread: Exact cause of libpng: decompression error




Exact cause of libpng: decompression error
user name
2007-03-11 10:11:18
I am writing an application that reads image data from a database and displays it (using directFB) to a touch screen LCD.  On rare occasion, the program crashes with the message "libpng: decompression error";.  I was wondering what were all the conditions that could generate this message?  Could it be the file is corrupt?  Or could it be an actual error internal the libpng or z decompression?

System info:

zlib 1.2.3
libpng 1.2.12

Thanks,
Rich
Re: Exact cause of libpng: decompression error
country flaguser name
United States
2007-03-11 13:45:57
From: Rich Rattanni
>On rare occasion, the program crashes with the message
>"libpng: decompression error".  I was
wondering what were
>all the conditions that could generate this message?  

I believe it can only happen if the stream of bytes sent,
by libpng, to the zlib decompression code is incorrect -
corrupted or incomplete.

>Could it be the file is corrupt?

Yes

> Or could it be an actual error internal the
>libpng or z decompression? 

Conceivably but unlikely.  More likely the code which
delivers
the byte stream to libpng (which in turn passes it to zlib)
messes
up the bytes.

If you can capture the byte stream to a file then the
original
data can be tested with pngcheck.  Try to do this at the
point
where the bytes are passed to libpng.  I would be surprised
if
the error cannot be reproduced this way.

John Bowler <jbowleracm.org>


------------------------------------------------------------
-------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the
chance to share your
opinions on IT & business topics through brief
surveys-and earn cash
http://www.techsay.com/default.
php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
png-mng-implement mailing list
png-mng-implementlists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/png-m
ng-implement

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )