Where is libpng source?

Where is libpng source?

Post by Vern Hox » Sat, 01 Mar 1997 04:00:00

Where can I find the source for 'libpng'?  It is used by Mosaic.

RedHat has a file 'libpng-0.98x-1.src.rpm' but I can't get 'rpm' to unpack


Vernon C. Hoxie                                           scicom!zebra!vern

Denver, Colo., 80212        uucp: 303-455-2670          voice: 303-477-1780
               Unix is what MSDOS will be when it grows up.


Where is libpng source?

Post by Albert D. Cahal » Sun, 02 Mar 1997 04:00:00

> Where can I find the source for 'libpng'?  It is used by Mosaic.
> RedHat has a file 'libpng-0.98x-1.src.rpm' but I can't get 'rpm'
> to unpack it.

You can get the source in libgr, available from sunsite.unc.edu.

I suggest that you _don't_ look at the source. I have, and it makes
my eyes hurt. It is full of 16-bit pre-ANSI C. It does not look 64-bit
clean. It is truly convoluted. It uses setjump and longjump to exit
from the library back to the calling program when there is an error.
The documentation is poor. The original source (ftp.uunet.net maybe)
even has the CR-LF line endings like DOS and comes in a .ZIP file.
There is no way you will use libpng with a C++ compiler. This library
is so bad that it stores an image as an array of row arrays to avoid
hitting the 64 kB malloc() limit on DOS systems. It expects to read
the image itself using fread(). At least it does not require a
little-endian machine.

I'd love to replace libpng with a more modern library. It should
support 32-bit and 64-bit machines, but not 16-bit machines. Even
DOS programmers can use DJGPP or Watcom C++ to get 32-bit pointers.
It should have ANSI C prototypes and all the 'extern "C"' things
needed for C++. It should take a pointer to the image, which might
be: in a mmaped file, half-downloaded to memory, read from a file,
or passed through a socket.

Albert Cahalan <acahalan at cs.uml.edu> My address may be mangled to
avoid junk email. Please check it if you wish to respond to a news post.


1. Compiling from source with multiple libpng's

I have different flavors of libpng on my system. (No, I'm not sure why: but
as a novice, I'm reluctant to force one off when RPMDrake says doing so
will break dependencies...)

I recently compiled and installed a new app (KBear2-beta) and it reports:
"libpng error: Incompatible libpng in application and library
libpng warning: Application was compiled with png.h from libpng-1.0.12
libpng warning: Application is running with png.c from libpng-1.2.4"

This is under KDE 3.0.3, installed from Mandrake 8.2 RPMs.

Compiling from source is new for me:
(a) do I point ./configure at the libpng-1.2.4 library or
(b) do I do the above at the make stage

And: how do I do either one of those?

Sorry to be so "new", but I won't learn any other way...

Thanks much!

2. OS 5.0.4 Install woes

3. What source am I getting with this?

4. sendmail and nscd hosts caching

5. I am looking for Kermit Sources?

6. doscmd's C: disk

7. I have a source code for troff from the book Unix Unleashed ,But I am

8. Modem communication speed.

9. Can any open source compiler convert C++ source to C source?

10. This clone thing...am I stupid, or am I right?

11. I am with the following error, when i am running lilo...

12. Am I touchy? Or am I right?