where is the libpng example.c file?

Asked by Graham

I want to create a .PNG graphical image file using gcc and libpng.
I found the LIBPNG (3) man page and <png.h> header file.
The man page says there are example.c and pngtest.c sample programs in the "contrib"
directory, but my Ubuntu file system does not have contrib.

I looked at http://www.libpng.org/pub/png/ and couldn't find the file.
I tried downloading from sourceforge but the only thing I found was
libpng-1.4.Orc01-1.2.41beta07-diff.txt

I tried Add/Remove Applications but couldn't find lib or png components.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ilya Barygin (randomaction) said :
#1

Install package libpng12-dev and the files will be in /usr/share/doc/libpng12-dev/examples/, gzipped.

Can you help with this problem?

Provide an answer of your own, or ask Graham for more information if necessary.

To post a message you must log in.